ID: 21306 Updated by: php-bugs@lists.php.net Reported By: Xuefer at 21cn dot com -Status: Feedback +Status: No Feedback Bug Type: Session related Operating System: linux PHP Version: 4.3.7 Assigned To: sas New Comment:
No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". Previous Comments: ------------------------------------------------------------------------ [2005-01-25 15:28:30] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip ------------------------------------------------------------------------ [2004-11-08 17:24:27] Xuefer at 21cn dot com i guess i've found the bug it's a "exception safe" problem as c++ well, not php5 exception, i meant zend_bailout(longjmp) when write handler issue a Fatal error, will trigger zend_bailout() and skip ALL other modules rshutdown, including the one right after session_flush_data(); session.c: static void php_session_flush(TSRMLS_D) { if(PS(session_status)==php_session_active) { php_session_save_current_state(TSRMLS_C); <-- NOT exception safe using for mod_user.c } PS(session_status)=php_session_none; <- WON'T executed when zend_bailout } suggested fix: mod_user.c :: function PS_WRITE_FUNC(user) chnage ====== retval = ps_call_handler(PSF(write), 2, args TSRMLS_CC); ====== to ====== zend_try { retval = ps_call_handler(PSF(write), 2, args TSRMLS_CC); } zend_end_try(); ====== ------------------------------------------------------------------------ [2003-05-20 10:03:32] [EMAIL PROTECTED] Code being executed twice really sounds like a problem in the scripting engine to me. It could be caused or triggered by defects in the tool chain (buggy compiler optimizer, broken bison/flex). Please retest with current Stable snapshot from snaps.php.net. ------------------------------------------------------------------------ [2003-03-06 11:35:25] soletan at toxa dot de Damn, I got rid of that message Xuefer initially posted. All I had done was calling exit() before session could write back its data. Then I included session_write_close() before some exit. It's not that exit inside some session_set_save_handler-calling function. It's any exit at any place, I expect. Isn't it possible, to include this needed call to session_write_close() automatically in sources of exit() to avoid all that trouble I have been handling with for the last 24 hours??? It would be more convenient, doesn't it? BTW: I have PHP 4.3.1 as DSO to Apache 2.0.43 under SuSE Linux 7.1. The first two are both self-compiled from source. Best Regards, Thomas Urban ------------------------------------------------------------------------ [2003-02-07 17:15:20] rob at nospamplease dot com This appears (in our case anyway) to be triggered by the use of an "exit" statement in the session_set_save_handler session_write function. We had a benign error in our custom session_write function (caused by the session data not changing when it was writing out).. this caused an error message to be written to a log file, and then the "exit;" statement. In PHP 4.2, this exit apparently caused no problems but now it generates this seemingly unrelated error message. Incidently, because this message is generated at the time of session_write (rather than during actual content generation) it also caused an interaction with ob_gzhandler (gzip compression) such that blank pages were being served up.. we had to disable ob_gzhandler to even see the "A session is active..." messages.. This seems buggy to me. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/21306 -- Edit this bug report at http://bugs.php.net/?id=21306&edit=1