RE: [PHP] phpbb / sessionid nightmare

From: Date: Mon, 30 Apr 2007 03:56:29 +0000
Subject: RE: [PHP] phpbb / sessionid nightmare
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-254126@lists.php.net to get a copy of this message
The cookie domain in phpbb is already set at ./domain.com ?????? I think I need to go back to my little hack? Opinions? Brad -----Original Message----- From: Chris [mailto:dmagick@gmail.com] Sent: Sunday, April 29, 2007 6:45 PM To: Brad Sumrall Cc: ceo@l-i-e.com; php-general@lists.php.net Subject: Re: [PHP] phpbb / sessionid nightmare Brad Sumrall wrote: > The cookie it's self says > PHPSESSID=26b7974a5d71c7d0bfebbf71750dac7b > Path=/ > Host=www.domain.com > > When I go to the jacked up page, I pickup this one > PHPSESSID=a787e077dd18ed18cb824f664d38315d > Path=/ > Host=domain.com That will be your problem. A cookie created on domain.com is ONLY readable by domain.com (unless you make it '.domain.com' which is technically different to 'domain.com'). Check out 'session.cookie_domain', you can set it with an ini_set call: ini_set('session.cookie_domain', '.domain.com'); See http://www.php.net/manual/en/ref.session.php and http://www.php.net/setcookie for more info about how cookie domains work. -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#254126) next »