|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2012-08-18 03:17 UTC] sskaje at gmail dot com
Description: ------------ I tried to create a minimum code to reproduce a crash caused on php 5.4.6 + apc 3.1.12, but only got a warning at last. Code can be found here: http://pastebin.com/0m08CNBR I start the built-in web server: php -S 0.0.0.0:8080 -c /usr/local/etc/php.ini APC config in PHP.ini: [apc] extension=apc.so apc.enabled = 1 apc.shm_segments = 1 apc.shm_size = 64M apc.optimization = 1 apc.num_files_hint = 0 apc.ttl = 0 apc.gc_ttl = 3600 apc.cache_by_default = on then i tried to visit that test script via browser: http://172.16.9.217:8080/test/index.php Warning given by the built-in web server: [root@localhost main]# php -S 0.0.0.0:8080 -c /usr/local/etc/php.ini PHP 5.4.6 Development Server started at Sat Aug 18 11:06:12 2012 Listening on http://0.0.0.0:8080 Document root is /usr/local/nginx/html/lehecai/control/main Press Ctrl-C to quit. [Sat Aug 18 11:06:16 2012] 172.16.6.100:65228 [200]: /test/index.php [Sat Aug 18 11:06:17 2012] 172.16.6.100:65229 [200]: /test/index.php [Sat Aug 18 11:06:17 2012] PHP Warning: Invalid callback mySessionHandlerS::write, class 'mySessionHandlerS' not found in Unknown on line 0 [Sat Aug 18 11:06:17 2012] PHP Warning: Unknown: Failed to write session data (user). Please verify that the current setting of session.save_path is correct () in Unknown on line 0 [Sat Aug 18 11:06:17 2012] PHP Warning: Invalid callback mySessionHandlerS::close, class 'mySessionHandlerS' not found in Unknown on line 0 [Sat Aug 18 11:06:23 2012] 172.16.6.100:65230 [200]: /test/index.php [Sat Aug 18 11:06:23 2012] PHP Warning: Invalid callback mySessionHandlerS::write, class 'mySessionHandlerS' not found in Unknown on line 0 [Sat Aug 18 11:06:23 2012] PHP Warning: Unknown: Failed to write session data (user). Please verify that the current setting of session.save_path is correct () in Unknown on line 0 [Sat Aug 18 11:06:23 2012] PHP Warning: Invalid callback mySessionHandlerS::close, class 'mySessionHandlerS' not found in Unknown on line 0 You can see it works at the first time, then failure unless terminate and start a new server. ==================================================== What's more, i tried to get some dump of the crash i said above both under php-fpm and the built-in server. bt info here: http://pastebin.com/b4pbjKra Code reproducing this crash can't be given at this time, i'll try to update this issue. Test script: --------------- http://pastebin.com/0m08CNBR PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 06:00:01 2025 UTC |
@rasmus yes i notice that before i figured out what caused the warning/crash directly. And the best solution might be if (function_exists('session_register_shutdown')) { session_register_shutdown(); } else { register_shutdown_function('session_write_close'); } coz i want my code runnable under both 5.3 and 5.4 without too much modification. What's more, 5.4 accepts the old style parameters as it accepted, but it warns/crashes only if i have apc loaded, without any literal error. So in my opinion this case should be fixed, maybe not now. Thanks for your reply.