note 58350 added to ref.session

From: Date: Tue, 01 Nov 2005 14:14:47 +0000
Subject: note 58350 added to ref.session
Groups: php.notes 
Request: Send a blank email to php-notes+get-97930@lists.php.net to get a copy of this message
While trying to get the php-session-based mambo CMS to work, I stumbled across a problem that: Whenever I tried to log in to the administration back end, the CMS would 1) Correctly verify that I had indeed entered the username and password correctly. 2) If in IE, it would maintain the session (ie let me into the first page of the administration back-end) until I clicked on a link*, and then would boot me back out to the login page. In Firefox it would immediately return me to the login page. * If I didn't click on the link, but copied the target of the link, and pasted it into my browser, I would not get booted back out to the login page! I found the temporary directory where session files were being stored and noticed that for every unsuccessful login, two session files were being created. [Seems bad!] One file was full of good session information, and the other (the one that was referenced by a cookie on my machine) was empty! The solution (that took several hours to find) was to comment out the line: session.referer_check = apachesecurity.net From the php.ini file. I have not yet experimented with this, but I would guess that a better solution would be to replace the "apachesecurity.net" with the domainname of the server? Hope this helps other people who have problems with sessions not being maintained / kept alive. keywords / key phrases: two session files one empty, session lost when clicked but not when url copy pasted into browser, mambo login loop, mambo authentication ---- Manual Page -- http://www.php.net/manual/en/ref.session.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+58350 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+58350&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+58350&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+58350&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+58350&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+58350&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+58350&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+58350&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+58350&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#97930) next »