note 55903 added to ref.session

From: Date: Wed, 17 Aug 2005 03:43:00 +0000
Subject: note 55903 added to ref.session
Groups: php.notes 
Request: Send a blank email to php-notes+get-93772@lists.php.net to get a copy of this message
I hope this helps someone: ---PHP SESSIONS NOT WORKING--- My sessions wouldnt ever load from disk. The sessions would start just fine, and a session file would be created and written to disk. (BTW, I'm on a win XP box, Apache 2.0.54, PHP version 5.0.4.) However, next time I loaded the page, the old session would not be used. Instead, a NEW session was created. For me, this happened no matter what computer I was using, whether it was the server (localhost) or a client (remote). A new session was created EVERY TIME I loaded the page.. it was annoying. After a few hours of googling, I gave up and decided to mess around in the php.ini file. I changed this line: session.cookie_path = / to this: session.cookie_path = Now, php sessions are loaded properly. I havent tried many things but I think maybe it is because windows needs backslashes (\) instead of forward slashes (/), and if you just leave it blank, it turns out ok. ---- Manual Page -- http://www.php.net/manual/en/ref.session.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+55903 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+55903&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+55903&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+55903&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+55903&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+55903&report=yes&reason=non-english Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+55903&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+55903&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#93772) next »