[pmwiki-users] Cookie conflict

Neil Herber nospam at eton.ca
Sun Sep 11 14:00:55 CDT 2005


At 2005-09-11  11:38 AM -0700, Mark Hamilton is rumored to have said:
>Does anyone have any ideas about I can get around this hassle? Keep in
>mind that I'm not a coder but I can follow instructions fairly well.

I don't have an exact solution, but I think I know what the problem is.

Cookies are identified by their name (such as "author") and by the 
server domain (such as "neil.eton.ca"). So if two cookies are set 
with the same name and same server domain, there will be a conflict. 
The cookie ignores any subdirectory so neil.eton.ca/pmwiki/ and 
neil.eton.ca/wordpress/  will happily (??!!) conflict.

One solution is to use different subdomains as in pmwiki.eton.ca  and 
wordpress.eton.ca.

Another solution ( and a far better one) is for the programs setting 
cookies to use a unique prefix, such as "pmw_author" and "wp_author". 
I suspect that the PmWiki cookie name could be controlled by the 
config.php file, but that may introduce problems with scripts that 
access the cookie by name. I would hope that most scripts would just 
user the $Author (?) variable inside PmWiki.


Neil

Neil Herber
Corporate info at http://www.eton.ca/
Eton Systems, 15 Pinepoint Drive, Nepean, ON, Canada K2H 6B1
Tel: (613) 829-4668 





More information about the pmwiki-users mailing list