sessions not compatible with PHP 5.2

Vygi
2006-11-09
2013-04-11
  • Vygi

    Vygi - 2006-11-09

    Hi here,

    today I have tried to upgrade my PHP to 5.2 and immediately after them I have started to get errors:

    "Fatal error: Call to a member function execute() on a non-object in [...]/session/adodb-session.php on line 127"

    This line contains indeed an execute statement where $db_object is not set when using PHP 5.2:

    $db_object->execute("UPDATE $table SET [...] ");

    95th line of same file says:

    $db_object =& $GLOBALS['ADODB_SESS_CONN'];

    I have tried to print_r($GLOBALS) and see that "ADODB_SESS_CONN =>" (is empty).

    After switching back to PHP 5.1 everything is right again.

    I can try to continue to debug this issue over the weekend (can't do it right now) if nobody else can do it.

     
    • Vygi

      Vygi - 2006-11-09

      p.s. I have submitted a bug report

       
    • Mark Dickenson

      Mark Dickenson - 2006-11-15

      The problem has been fixed for the next release.  For more information please check the bug reports.

       
    • Vygi

      Vygi - 2006-11-15

      thanks a lot!!
      Vygi
      P.S. looks like PHP 5.2 is going to cause lots of problems in many applications because of such small but weighty changes like destroying all objects before calling session closing handler

       
    • Mark Dickenson

      Mark Dickenson - 2006-11-15

      Yeah, they added that in PHP 5.0.6 and I was using a slightly earlier version of PHP 5 and didn't run into that problem.  Adding that one program line detailed in the bug report should allow the session database to work on any version of PHP.

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks