ID: 21306
Updated by: [EMAIL PROTECTED]
Reported By: Xuefer at 21cn dot com
Status: Feedback
Bug Type: Session related
Operating System: linux
PHP Version: 4CVS (2005-09-16) (5CVS, 6CVS)
Assigned To: sas
New Comment:
And wouldn't it be better to add that stuff in the ps_call_handler()
function, not just in one place it is used?
Previous Comments:
------------------------------------------------------------------------
[2005-09-20 13:04:51] [EMAIL PROTECTED]
Why do you patch zend_API.c?? The part you added the zend_try..catch
thing is already covered with such elsewhere.
------------------------------------------------------------------------
[2005-09-19 17:50:16] Xuefer at 21cn dot com
fine
Index: zend_API.c
===================================================================
RCS file: /repository/ZendEngine2/zend_API.c,v
retrieving revision 1.315
diff -u -r1.315 zend_API.c
--- zend_API.c 1 Sep 2005 10:04:55 -0000 1.315
+++ zend_API.c 19 Sep 2005 15:46:39 -0000
@@ -2335,7 +2335,9 @@
#if 0
zend_printf("%s: Request shutdown\n", module->name);
#endif
+ zend_try {
module->request_shutdown_func(module->type,
module->module_number TSRMLS_CC);
+ } zend_end_try();
}
return 0;
}
Index: mod_user.c
===================================================================
RCS file: /repository/php-src/ext/session/mod_user.c,v
retrieving revision 1.29
diff -u -r1.29 mod_user.c
--- mod_user.c 3 Aug 2005 14:07:43 -0000 1.29
+++ mod_user.c 19 Sep 2005 15:48:49 -0000
@@ -145,7 +145,9 @@
SESS_ZVAL_STRING(key, args[0]);
SESS_ZVAL_STRINGN(val, vallen, args[1]);
+ zend_try {
retval = ps_call_handler(PSF(write), 2, args TSRMLS_CC);
+ } zend_end_try();
FINISH;
}
indent/space change is not included for readablity.
any one patch will do
------------------------------------------------------------------------
[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();
======
------------------------------------------------------------------------
[2002-12-31 02:00:45] Xuefer at 21cn dot com
i've got this problem after i upgrade from php4.2.2 to 4.3.0:
[31-Dec-2002 15:30:03] PHP Warning: Unknown(): A session is active.
You cannot change the session module's ini settings at this time. in
Unknown on line 0
seems a internal error, php script
hope this to be fix soon
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=21306&edit=1