[pmwiki-users] Cookie conflict

Patrick R. Michaud pmichaud at pobox.com
Sun Sep 11 13:59:45 CDT 2005


On Sun, Sep 11, 2005 at 11:38:21AM -0700, Mark Hamilton wrote:
> I have a pmwiki and a WordPress blog both on the same web server, with
> the WordPress files in a separate directory. When I use the wiki, it
> appears to set a cookie (it may be the one named "author") that then
> stops WordPress fro working properly. 

Try the following lines in your local/config.php file:

if (!isset($Author)) {
  if (isset($_POST['author'])) {
    $Author = htmlspecialchars(stripmagic($_POST['author']),ENT_QUOTES);
    setcookie('author_pm',$Author,$AuthorCookieExpires,$AuthorCookieDir);
  } else {
    $Author = htmlspecialchars(stripmagic(@$_COOKIE['author_pm']),ENT_QUOTES);
  }
  $Author = preg_replace('/(^[^[:alpha:]]+)|[^-\\w ]/','',$Author);
}

This changes PmWiki to use a cookie of 'author_pm' instead of
'author' for the author name.

Pm




More information about the pmwiki-users mailing list