Page 1 of 1

Notice: A session had already been started...

Posted: Tue Sep 04, 2007 7:06 am
by JWalker
After upgrading to the latest version - 1.2, at very first loading of the blog this message appears at the bottom of the page:

Code: Select all

Notice: A session had already been started - ignoring session_start() in D:\biz\apps\serendipity\serendipity_config.inc.php on line 20
My system is
Windows XP SP2 / Apache 2.0.59 / PHP 5.2.3 / Firefox 2.0.0.6.
From serendipity_config.inc.php:

Code: Select all

if (!headers_sent()) {
    session_start();
    
    // Prevent session fixation by only allowing sessions that have been sent by the server.
    // Any session that does not contain our unique token will be regarded as foreign/fixated
    // and be regenerated with a system-generated SID.
    // Patch by David Vieira-Kurz of majorsecurity.de
    if (!isset($_SESSION['SERVER_GENERATED_SID'])) {
        session_regenerate_id(true);
        session_start();                 // <<<<<<<<<<<<<<<<<<< line 20
        header('X-Session-Reinit: true');
        $_SESSION['SERVER_GENERATED_SID'] = true;
    }
}
Thereafter it does not appear.

Re: Notice: A session had already been started...

Posted: Tue Sep 04, 2007 12:13 pm
by garvinhicking
Hi!

Try to put a "@" in front of that session_start? It seems to only be a PHP notice, and thus can be suppressed.

Regards,
Garvin

Yes

Posted: Tue Sep 04, 2007 3:34 pm
by JWalker
Hi,

I've put '@' and the message did not appear anymore.
Thanks!