minor, surpressing notices

Discussion corner for Developers of Serendipity.
Post Reply
assent
Regular
Posts: 9
Joined: Thu Oct 18, 2007 12:20 pm

minor, surpressing notices

Post 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
----------------------------------------------------
Assen Tchorbadjiev
Aplus.Net Internet Services
assent [at] aplus.net
2C35 8891 6DCB 2D4C BAA0 13E9 35F9 7F6A 41E0 8A1E <pgp.mit.edu>
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: minor, surpressing notices

Post 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
# 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/
assent
Regular
Posts: 9
Joined: Thu Oct 18, 2007 12:20 pm

Re: minor, surpressing notices

Post 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.
----------------------------------------------------
Assen Tchorbadjiev
Aplus.Net Internet Services
assent [at] aplus.net
2C35 8891 6DCB 2D4C BAA0 13E9 35F9 7F6A 41E0 8A1E <pgp.mit.edu>
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: minor, surpressing notices

Post 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
# 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/
assent
Regular
Posts: 9
Joined: Thu Oct 18, 2007 12:20 pm

Re: minor, surpressing notices

Post 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
----------------------------------------------------
Assen Tchorbadjiev
Aplus.Net Internet Services
assent [at] aplus.net
2C35 8891 6DCB 2D4C BAA0 13E9 35F9 7F6A 41E0 8A1E <pgp.mit.edu>
assent
Regular
Posts: 9
Joined: Thu Oct 18, 2007 12:20 pm

Re: minor, surpressing notices

Post 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.
----------------------------------------------------
Assen Tchorbadjiev
Aplus.Net Internet Services
assent [at] aplus.net
2C35 8891 6DCB 2D4C BAA0 13E9 35F9 7F6A 41E0 8A1E <pgp.mit.edu>
Post Reply