>>The only major flaw I've found with PHP's session support is that it >>doesn't appear to be possible to force the data to be written without >>also closing the session. > >Mike - can you expand on your point above?
I've running into this problem where--in an app with a lot of OOP and reference-passing, on a shared host--requests would die out before reaching the end, though they'd do enough work to be useful. I can't seem to be able to fix the instability (see below), but I was able to work around one of the flaws of the session support: normally the user's session data is read from a file, typically in /tmp, at the start of a request. This data is manipulated by the script when values in $GLOBALS['_SESSION'] are changed, and then it's written back to the file at the end of the request. My issue was that frequently, my scripts wouldn't finish correctly, session data would not be written to the file, and therefore it would be lost between requests. I had hoped to find a function like session_write_close() that did not have the side effect of closing the session altogether, but instead I ended up rolling my own, with more frequent disk writes at crucial junctures. If anyone can help shed any light on the sort of instability I'm seeing, that would really help. Apache child processes die right and left, with segfaults and bus errors. --------------------------------------------------------------------- michal migurski- contact info and pgp key: sf/ca http://mike.teczno.com/contact.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php