Re: A request for code change : Repeated opening and closing the session leads to a LOT of Set-Cookie headers.
| From: | Richard Quadling | Date: | Fri, 16 Mar 2007 10:28:26 +0000 |
| Subject: | Re: A request for code change : Repeated opening and closing the session leads to a LOT of Set-Cookie headers. | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-28368@lists.php.net to get a copy of this message | ||
On 15/03/07, Richard Lynch <ceo@l-i-e.com> wrote:
I think you still need locking in PHP Userland for concurrent access to be meaningful to most developers... Otherwise you end up with a race condition in the session save handler.As only 1 process can hold the session at a time and the main process is constantly "letting go" by session_write_close(), other processes are able to open/read/close (to get the current status) or open/write/close (to tell the main process to abort). Without the session_write_close() in the main process, the secondary processes will wait either for the appropriate set_time_limit() or until the main process script ends. Which is correct. This is working very well for me now. It was the extra Set-Cookie headers which screwed things up for IE. By using ini_set('sessions.use_cookies', 0); immediately after the session_start() in the main process, the problem has been solved. The main process doesn't output any urls/forms/etc, so the session id is not appended to any urls. If the session cookie could be cached then that would be great, but I need someone else to look at the supplied patch (I'm not that good with PHP internals). Richard. -- ----- Richard Quadling Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 "Standing on the shoulders of some very clever giants!"