Hi Garvin,
I've been noticing a lot of serendipity errors, and some hige lags in page loads just recently.
Am running 1.2
Here is what the apache logs say:
[Thu Jan 17 14:05:12 2008] [error] [client xxx.xxx.xxx.xxx] PHP Notice: A session had already been started - ignoring session_start() in /path/to/serendipity/serendipity_config.inc.php on line 20
Have you got any clues as to why this may be, I'm getting hundreds of these showing up.
Thanks,
Ket
Session PHP Notices appearing in apache error logs
-
spiritquest
- Regular
- Posts: 24
- Joined: Tue Feb 06, 2007 1:22 pm
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Session PHP Notices appearing in apache error logs
Hi!
Does your PHP have the session.auto_start enabled? That doesn't go well with s9y.
That PHP Notice is not performance-relevant, though.
Regards,
Garvin
Does your PHP have the session.auto_start enabled? That doesn't go well with s9y.
That PHP Notice is not performance-relevant, though.
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
spiritquest
- Regular
- Posts: 24
- Joined: Tue Feb 06, 2007 1:22 pm
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
So these messages only started to occur recently? Did you change anything in the server config, PHP config, serendipity version or serendipity plugins?
Regards,
Garvin
So these messages only started to occur recently? Did you change anything in the server config, PHP config, serendipity version or serendipity plugins?
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
spiritquest
- Regular
- Posts: 24
- Joined: Tue Feb 06, 2007 1:22 pm
I don't know if they started recently. I only noticed them when I went to investigate the slow down. I can look back at earlier logs. I haven't been plugged into the blog much since before xmas.
I'll check.
As far as plugins, no nothing new, and as far as I can tell no changes on the server. We have our own vserver and the hosts have not (would normally) told us of any changes.
I'll check all of the above to make sure.
I'll check.
As far as plugins, no nothing new, and as far as I can tell no changes on the server. We have our own vserver and the hosts have not (would normally) told us of any changes.
I'll check all of the above to make sure.
-
spiritquest
- Regular
- Posts: 24
- Joined: Tue Feb 06, 2007 1:22 pm
I haven't been able to check back in previous logs, as the logrotate wasn't set to archive logs for any period of time.
I can tell you that the logs are continuously reporting PHP Notices to the effect:
A session had already been started - ignoring session_start() ...
I will re-check the server configs. I have a serendipity version offline (on my local machine) And I don't get the php Notices there. It is a completely different setup though.
I can tell you that the logs are continuously reporting PHP Notices to the effect:
A session had already been started - ignoring session_start() ...
I will re-check the server configs. I have a serendipity version offline (on my local machine) And I don't get the php Notices there. It is a completely different setup though.
-
spiritquest
- Regular
- Posts: 24
- Joined: Tue Feb 06, 2007 1:22 pm
Should it be reading line 20
Having a look at the line of code that the error message is looking at I see the following:
So this must mean if line 20 is being read, that the server variable is not being read and therefore, the command is being parsed again.
Does that sound logical ?
Ket
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();
header('X-Session-Reinit: true');
$_SESSION['SERVER_GENERATED_SID'] = true;
}
}Code: Select all
$_SESSION['SERVER_GENERATED_SID']Code: Select all
session_start();Does that sound logical ?
Ket