SourceForge has been redesigned. Learn more.
Close

#2467 sqsession_is_active suppresses error messages

open
nobody
None
5
2007-05-12
2007-05-12
No

You ignore warnings on irc, so here goes bug report.

In SquirrelMail 1.4.10/1.5.2svn sqsession_is_active() function was modified to call session_start() every time it is called. 'Session started' error messages are suppressed with @. But @ also disables other session_start() errors.

It makes debugging harder, because scripts will fail without error output when session extension is not available. All session write notices are disabled.

Please confirm that Paul's observations about session_id behaviour in #1685031 'session is closed before webmail_top hook' bug report are based on standard unmodified SquirrelMail scripts and standard PHP session extension.

session_id returns session id string after session is closed with session_write_close() function call in PHP 4.1.2, 4.4.4, 4.4.7, 5.2.0 and 6-dev.

Discussion

  • Matthew S. Soffen

    A simpler fix could be to change one line in functions/global.php

    Change line 388

    From:
    @session_start();
    To:
    if (session_id() == "") @session_start();

    This supresses the error

     
  • Paul Lesniewski

    Paul Lesniewski - 2008-11-14

    There was code in SM that did exactly that. It was removed because in some versions, PHP reports the session ID even when the session is closed. 1.5.2 can have its debug mode changed so you can view any session_start() errors, so this report only applies to 1.4.x at this time, which may not ever be changed like 1.5.2 has been.

     
  • Tomas Kuliavas

    Tomas Kuliavas - 2008-11-14

    All php versions do that. Please provide information about your setup, which somehow does not act the way stock php versions act and code is able to write data to closed sessions.

     

Log in to post a comment.