ID:               48922
 Updated by:       j...@php.net
 Reported By:      bobby at indesignfirm dot com
 Status:           No Feedback
 Bug Type:         Session related
 Operating System: RedHat 2.6.9-42.0.8.EL #1
 PHP Version:      5.2.10
 New Comment:

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.




Previous Comments:
------------------------------------------------------------------------

[2009-07-15 12:09:20] j...@php.net

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/



------------------------------------------------------------------------

[2009-07-14 20:15:11] bobby at indesignfirm dot com

After more research it would seem that the problem lies within the read
function using the mysqli_connect function.  If I change it to
mysql_connect, processing continues, changing it back to mysqli_connect
causes it to instantly fail with no further information.

However all other mysqli queries are running fine.

------------------------------------------------------------------------

[2009-07-14 19:48:55] bobby at indesignfirm dot com

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 this bug report at http://bugs.php.net/?id=48922&edit=1

Reply via email to