Page 1 of 1
minor, surpressing notices
Posted: Tue Nov 06, 2007 5:18 pm
by assent
Hello,
attached is a patch for a minor issue with the serendipity_config.inc.php file.
There are cases when the code around the session_start() call tries to access non-existent cookie values, and several notices are displayed.
However, after the notices are being printed out, several warnings appear, for the script being unable to send the headers, and this actually seems to stop the session cookie to be sent properly.
The patch itself only moves the "error_reporting( E_ALL ~ E_NOTICE ); " line before the session_start() call, to avoid such notices. I don't think this should generally affect any other aspects of the tool.
http://assent.cpteam-unix.com/s9y/seren ... c.php.diff
Thanks,
Assen
Re: minor, surpressing notices
Posted: Tue Nov 06, 2007 10:46 pm
by garvinhicking
Hi!
Could you tell us about how that error message could come to existance? I thought the "headers_sent()" check would already rectify any possible occurences?
Regards,
Garvin
Re: minor, surpressing notices
Posted: Wed Nov 07, 2007 10:28 am
by assent
garvinhicking wrote:Hi!
Could you tell us about how that error message could come to existance? I thought the "headers_sent()" check would already rectify any possible occurences?
Regards,
Garvin
Its a somewhat specific situation, it happens in case there are 2x different session cookies. We use to automate the login to the blog, and we send out a session cookie. If there is a regular login in the meantime, via the s9y interface, the access to the cookie value(s) results in the notice.
Re: minor, surpressing notices
Posted: Wed Nov 07, 2007 11:28 am
by garvinhicking
Hi!
Would there be a case to check for that specific occassion / duplicate cookie? What I'm afraid of is that other error notices (that would help us analyze a support situation) would also vanish, if we move the error_reporting stuff?
Regards,
Garvin
Re: minor, surpressing notices
Posted: Wed Nov 07, 2007 1:35 pm
by assent
garvinhicking wrote:Hi!
Would there be a case to check for that specific occassion / duplicate cookie? What I'm afraid of is that other error notices (that would help us analyze a support situation) would also vanish, if we move the error_reporting stuff?
Regards,
Garvin
I understand, I'll try to pinpoint this outside our env.
btw, I think notices should be handled more like in debug cases or similar, ie, not with the std. production versions.
EDIT: here is a snapshot with the erroneous output:
http://assent.cpteam-unix.com/s9y/blog-error.jpg
Re: minor, surpressing notices
Posted: Tue Nov 20, 2007 3:08 pm
by assent
assent wrote:garvinhicking wrote:Hi!
Would there be a case to check for that specific occassion / duplicate cookie? What I'm afraid of is that other error notices (that would help us analyze a support situation) would also vanish, if we move the error_reporting stuff?
Regards,
Garvin
I understand, I'll try to pinpoint this outside our env.
[..]
It seems the issue occurs only under very specific circumstances to our environment, so we can't really reproduce it with a general installation.