On 15/03/07, Richard Lynch <[EMAIL PROTECTED]> 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!"

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to