1

Topic: check_cookie function log message

Just wondering if anyone might be able to shed light on how to track this down. Occasionally, and I've not been able to find exactly what triggers it yet, I get this message in the server logs:

(mod_fastcgi.c.2570) FastCGI-stderr: PHP Notice:  Undefined offset:  2 in include/functions.php on line 44

I'm running with E_ALL in PHP with regards to error notices, to track down any possible typo's or such which may exist, and this is the only thing which I haven't been able to sort yet. big_smile Line 44 in functions.php is:

list($cookie['user_id'], $cookie['password_hash'], $cookie['group_id']) = @unserialize($_COOKIE[$cookie_name]);

Modified cookie setup to store the group id in the cookie, but the code has been altered throughout PunBB to reflect that, so there shouldn't be a mismatch in that regard anywhere, that I know of. Any suggestions greatly appreciated. This one is doing my nut in. big_smile


Cheers,

Matt

Re: check_cookie function log message

Try logging out and in again. Have others do that too.

3 (edited by MattF 2008-01-08 20:21)

Re: check_cookie function log message

So it could just be down to cookies that were created before the pun_setcookie function, (and associated functions),  were updated?

Edit: I've just logged in and out of the various forums, and I don't seem to be triggering it. smile

4

Re: check_cookie function log message

Well, I've just managed to isolate one occasion that triggered it. A client machine pulling the RSS feed. Is it safe to surmise that this is just due to some people still having the old layout cookies, due to not having logged in since I altered the cookie code?


Cheers. smile

Re: check_cookie function log message

Most likely, yes.

6

Re: check_cookie function log message

Cheers. smile I can stop obsessing over that one then. big_smile Thanks again.

7

Re: check_cookie function log message

Finally got a cure sorted for this one, I believe. big_smile Added an isset clause within the check_cookie function to set default user if that field/var wasn't set. Seems to have gradually stopped that notice from appearing in the logs. Cheers for the advice Elbekko. smile