Menu

$session->gc() double declared?

Help
2003-02-05
2003-09-09
  • Fiorenza Caetani

    I've been using phplib without problems until now. I've upgraded php from php 4.2 to php 4.3, and i've had a surprise: where i've used session.inc now i've this error:

    Fatal error: Cannot redeclare gc() in [..path to php/ dir ..]session.inc on line 464.

    I've checked and found this:

    in session.inc it looks like if there is a "double declared" gc() function: the first around line 338, right after the declaration of thaw() function, the second around line 464, just before the declaration of the start() function.

    I've made a test, commenting out the first declaration of gc() in a work only for my usage, but I'm wondering: may I do this safely? and why with php 4.2 it wasn't a problem?

    I'm using phplib 7.2d

    Thanks to everybody for any help/suggestion.
    :-) Fiorenza

     
    • argy

      argy - 2003-09-09

      I noticed the same thing.

      Without being sure if it's ok, I just commented the second gc() function.

       
      • Layne Weathers

        Layne Weathers - 2003-09-09

        According to CVS, Richard Archer fixed this on Aug 18, 2001. Maybe it's time to upgrade your PHPLib. I've been using the latest release on my production servers for some time now.

         

Log in to post a comment.