|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-02-15 13:44 UTC] root at mediamonks dot net
Description: ------------ Apache 2.0.53 & mod_php5 5.0.3 Sessions occasionally work, but in two-thirds of the session requests an error is generated and the apache child segfaults. Error recorded in the logfile: PHP Fatal error: Unknown: Cannot find save handler \x02 in Unknown on line 0 Error reported on site: Notice: Undefined variable: HTTP_SESSION_VARS in <file> Notice: Undefined variable: _SESSION in in <file> Warning: session_register() [function.session-register]: Cannot find save handler in <file> Warning: session_register() [function.session-register]: Cannot find save handler in <file> I'm using php.ini-recommended as php.ini. Tried commenting out session.save_handler, setting it to "files" and just files. Reproduce code: --------------- session_start(); PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 18:00:01 2025 UTC |
Backtrace: #0 ps_mm_destroy (data=0x82df880) at /home/terrence/php/php5-STABLE-200502211130/ext/session/mod_mm.c:243 #1 0x284d0a1d in zm_shutdown_ps_mm (type=1, module_number=3) at /home/terrence/php/php5-STABLE-200502211130/ext/session/mod_mm.c:295 #2 0x284cf895 in zm_shutdown_session (type=1, module_number=3) at /home/terrence/php/php5-STABLE-200502211130/ext/session/session.c:1824 #3 0x2856acfa in module_destructor (module=0x82f0c80) at /home/terrence/php/php5-STABLE-200502211130/Zend/zend_API.c:1500 #4 0x2856d0bd in zend_hash_apply_deleter (ht=0x285e8360, p=0x82efd00) at /home/terrence/php/php5-STABLE-200502211130/Zend/zend_hash.c:574 #5 0x2856d1ee in zend_hash_graceful_reverse_destroy (ht=0x285e8360) at /home/terrence/php/php5-STABLE-200502211130/Zend/zend_hash.c:640 #6 0x28566f34 in zend_shutdown () at /home/terrence/php/php5-STABLE-200502211130/Zend/zend.c:699 #7 0x28538b54 in php_module_shutdown () at /home/terrence/php/php5-STABLE-200502211130/main/main.c:1516 #8 0x28538b23 in php_module_shutdown_wrapper (sapi_globals=0x285e3140) at /home/terrence/php/php5-STABLE-200502211130/main/main.c:1491 #9 0x285a3d85 in php_apache_server_shutdown (tmp=0x0) at /home/terrence/php/php5-STABLE-200502211130/sapi/apache2handler/sapi_apache2.c:331 #10 0x2831d8f8 in run_cleanups () from /usr/local/lib/apache2/libapr-0.so.9 #11 0x2831cd11 in apr_pool_clear () from /usr/local/lib/apache2/libapr-0.so.9 #12 0x806890e in main () #13 0x805ce2e in _start ()I thought I'd try attaching gdb to an apache child and provoke a segfault with the latest stable CVS snapshot. The result is: Continuing. Program received signal SIGSEGV, Segmentation fault. 0x285d9179 in php_apache_sapi_ub_write ( str=0x80ca924 "<br />\n<b>Fatal error</b>: Unknown: Cannot find save handler \002 in <b>Unknown</b> on line <b>0</b><br />\n", str_length=105) at /home/terrence/php/php5-STABLE-200504110038/sapi/apache2handler/sapi_apache2.c:76 76 r = ctx->r; (gdb) bt #0 0x285d9179 in php_apache_sapi_ub_write ( str=0x80ca924 "<br />\n<b>Fatal error</b>: Unknown: Cannot find save handler \002 in <b>Unknown</b> on line <b>0</b><br />\n", str_length=105) at /home/terrence/php/php5-STABLE-200504110038/sapi/apache2handler/sapi_apache2.c:76 #1 0x2857567f in php_ub_body_write_no_header ( str=0x80ca924 "<br />\n<b>Fatal error</b>: Unknown: Cannot find save handler \002 in <b>Unknown</b> on line <b>0</b><br />\n", str_length=105) at /home/terrence/php/php5-STABLE-200504110038/main/output.c:684 #2 0x28574592 in php_body_write ( str=0x80ca924 "<br />\n<b>Fatal error</b>: Unknown: Cannot find save handler \002 in <b>Unknown</b> on line <b>0</b><br />\n", str_length=105) at /home/terrence/php/php5-STABLE-200504110038/main/output.c:119 #3 0x28564667 in php_printf (format=0x285f5f20 "%s<br />\n<b>%s</b>: %s in <b>%s</b> on line <b>%d</b><br />\n%s") at /home/terrence/php/php5-STABLE-200504110038/main/main.c:399 #4 0x28565192 in php_error_cb (type=1, error_filename=0x28611b8b "Unknown", error_lineno=0, format=0x285f5cb4 "%s", args=0xbfbff1e0 "$\2174\b\021]_(0") at /home/terrence/php/php5-STABLE-200504110038/main/main.c:740 #5 0x285a857b in zend_error (type=1, format=0x285f5cb4 "%s") at /home/terrence/php/php5-STABLE-200504110038/Zend/zend.c:921 #6 0x28564aff in php_verror (docref=0x0, params=0x285f5b58 "", type=1, format=0x285dcf77 "Cannot find save handler %s", args=0xbfbff294 "?~4\b?\221b(?~4\b????\233~[(") at /home/terrence/php/php5-STABLE-200504110038/main/main.c:539 #7 0x28564c3d in php_error_docref0 (docref=0x0, type=1, format=0x285dcf77 "Cannot find save handler %s") at /home/terrence/php/php5-STABLE-200504110038/main/main.c:559 #8 0x284d2d3e in OnUpdateSaveHandler (entry=0x82f7a00, new_value=0x8347ee4 "\002", new_value_length=5, mh_arg1=0x0, mh_arg2=0x0, mh_arg3=0x0, stage=16) at /home/terrence/php/php5-STABLE-200504110038/ext/session/session.c:102 #9 0x285b7e9b in zend_alter_ini_entry (name=0x835d0e0 "session.save_handler", name_length=21, new_value=0x835c600 "\002", new_value_length=5, modify_type=2, stage=16) at /home/terrence/php/php5-STABLE-200504110038/Zend/zend_ini.c:227 #10 0x285da754 in apply_config (dummy=0x8107350) at /home/terrence/php/php5-STABLE-200504110038/sapi/apache2handler/apache_config.c:169 #11 0x285d9c1c in php_handler (r=0x8355050) at /home/terrence/php/php5-STABLE-200504110038/sapi/apache2handler/sapi_apache2.c:452 #12 0x8063f34 in ap_run_handler () #13 0x806448d in ap_invoke_handler () #14 0x806173f in ap_process_request () #15 0x805d217 in ap_process_http_connection () #16 0x806cc10 in ap_run_process_connection () #17 0x806ced4 in ap_process_connection () #18 0x8062b3b in child_main () #19 0x8062c92 in make_child () #20 0x8062cee in startup_children () #21 0x8063037 in ap_mpm_run () #22 0x8068aac in main () #23 0x805ce2e in _start ()The following "patch" fixes all the errors, and everything works as usual after applying it: --- session.c Thu Mar 24 02:32:45 2005 +++ session-new.c Mon Apr 11 08:39:38 2005 @@ -96,6 +96,8 @@ { SESSION_CHECK_ACTIVE_STATE; + new_value="files"; PS(mod) = _php_find_ps_module(new_value TSRMLS_CC); if (PG(modules_activated) && !PS(mod)) {