From: oleg dot grenrus at dynamoid dot com Operating system: PHP version: 5.2.6 PHP Bug Type: Session related Bug description: Session.serialize_handler declared by shared extension in php.ini don't work
Description: ------------ PHP warnings are issued as PHP Warning: session_start(): Unknown session.serialize_handler. Failed todecode session object. in - on line 2 PHP Warning: Unknown: Unknown session.serialize_handler. Failed to encode session object. in Unknown on line 0 These happen because session module try's to find serialize_handler before serializer module is loaded (and registered itself as valid serialize_handler) There are check for save_handler (PS(mod) != NULL) in the PHP_RINIT_FUNCTION(session), but not for PS(serializer) I wrote a short patch http://phadej.daug.net/php-5.2.6-serialize_handler.patch against php-5.2.6. PHP_RINIT_FUNCTION seems to be same in php-5.2 and php-5.3 brances. Reproduce code: --------------- php -d "extension=wddx.so" -d 'session.serialize_handler=wddx' <<\EOF <?php var_dump(session_start()); ?> EOF Expected result: ---------------- bool(true) Actual result: -------------- PHP Warning: session_start(): Unknown session.serialize_handler. Failed to decode session object. in /home/phadej/dev/php-sess-bug/- on line 2 bool(true) PHP Warning: Unknown: Unknown session.serialize_handler. Failed to encode session object. in Unknown on line 0 -- Edit bug report at http://bugs.php.net/?id=45406&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45406&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45406&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45406&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45406&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45406&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45406&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=45406&r=needscript Try newer version: http://bugs.php.net/fix.php?id=45406&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45406&r=support Expected behavior: http://bugs.php.net/fix.php?id=45406&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45406&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45406&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45406&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45406&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45406&r=dst IIS Stability: http://bugs.php.net/fix.php?id=45406&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45406&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45406&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45406&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=45406&r=mysqlcfg