note 100311 modified in function.session-write-close by danbrown
| From: | danbrown@php.net | Date: | Thu, 07 Oct 2010 16:08:25 +0000 |
| Subject: | note 100311 modified in function.session-write-close by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-173057@lists.php.net to get a copy of this message | ||
I was having problems with $_SESSION information not being written or being lost in a seemingly
random way. There was a Location: call being made deep in a Zend OAuth module, I am using an IIS
server with PHP as a CGI, etc.
The answer was simply that you need to have the domain be consistent for sessions to work
consistently. In my case, I was switching back and forth between www.EXAMPLE.com:888 and
EXAMPLE.com:888. The unusual port, the hidden Location: call, the handoff with OAuth, etc all
served to confuse me, but the intermitent error was caused by this simple goof of keeping the domain
consistent.
--was--
I was having problems with $_SESSION information not being written or being lost in a seemingly
random way. There was a Location: call being made deep in a Zend OAuth module, I am using an IIS
server with PHP as a CGI, etc.
The answer was simply that you need to have the domain be consistent for sessions to work
consistently. In my case, I was switching back and forth between www.MYDOMAIN.com:888 and
MYDOMAIN.com:888. The unusual port, the hidden Location: call, the handoff with OAuth, etc all
served to confuse me, but the intermitent error was caused by this simple goof of keeping the domain
consistent.
http://php.net/manual/en/function.session-write-close.php