Tracker: Bugs

5 sqsession_is_active suppresses error messages - ID: 1717809
Last Update: Comment added ( tokul )

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.


Tomas Kuliavas ( tokul ) - 2007-05-12 15:21

5

Open

None

Nobody/Anonymous

None

None

Public


Comments ( 3 )

Date: 2008-11-14 21:32
Sender: tokul

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.


Date: 2008-11-14 21:24
Sender: pdontthinkProject AdminAccepting Donations

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.


Date: 2008-11-14 19:57
Sender: sirgeek

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


Attached File

No Files Currently Attached

Change

No changes have been made to this artifact.