From: bobby at indesignfirm dot com Operating system: RedHat 2.6.9-42.0.8.EL #1 PHP version: 5.2.10 PHP Bug Type: Session related Bug description: session_set_save_handler appears to cause all processing to stop
Description: ------------ Server upgraded from 5.2.9 last night and suddenly any scripts using custom session set save handler has stopped working. No errors reported, all processing just stops. Un-commenting the code makes everything come back to life. Reproduce code: --------------- function open($savePath, $sessName) { return true; } function close() { return true; } function read($sessID) { //Lookup the session in the database $readquery = new QueryCall(); $readquery->SetProcedureName('Session_GetData'); $readquery->AddVariable('TEXT', $sessID); $readquery->ExecuteQuery(); //Now return the data we get back from the database return $readquery->procedureResults[0]['d']; } function write($sessID,$sessData) { //Write the session data to the database $writequery = new QueryCall(); $writequery->SetProcedureName('Session_WriteData'); $writequery->AddVariable('TEXT', $sessID); $writequery->AddVariable('TEXT', time()); $writequery->AddVariable('TEXT', $sessData); $writequery->ExecuteQueryNoResults(); //Now return true just to keep it happy return TRUE; } function destroy($sessID) { //Destroy the session that we need to get rid of $destroyquery = new QueryCall(); $destroyquery->SetProcedureName('Session_Destroy'); $destroyquery->AddVariable('TEXT', $sessID); $destroyquery->ExecuteQueryNoResults(); //Return True just to make everything happy return TRUE; } function gc($sessMaxLifeTime) { //Calculate what the time limit is $timelimit = time() - $sessMaxLifeTime; //Let's do some garbage collection $garbagequery = new QueryCall(); $garbagequery->SetProcedureName('Session_GarbageCollection'); $garbagequery->AddVariable('TEXT', $timelimit); $garbagequery->ExecuteQueryNoResults(); //Return true just to make everything happy return TRUE; } session_set_save_handler('open', 'close', 'read', 'write', 'destroy', 'gc'); Expected result: ---------------- Session information should be stored in the database and has been working for several months now. Since the upgrade of 5.2.10 it has stopped working. No code changes have been made to application Actual result: -------------- Blank page. Nothing returned. -- Edit bug report at http://bugs.php.net/?id=48922&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48922&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48922&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48922&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=48922&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48922&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=48922&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=48922&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=48922&r=needscript Try newer version: http://bugs.php.net/fix.php?id=48922&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=48922&r=support Expected behavior: http://bugs.php.net/fix.php?id=48922&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=48922&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=48922&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=48922&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48922&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=48922&r=dst IIS Stability: http://bugs.php.net/fix.php?id=48922&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=48922&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=48922&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=48922&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=48922&r=mysqlcfg