Page 1 of 1

Difference in cookies between PHP4 and PHP5?

Posted: Tue Mar 11, 2008 9:06 pm
by Josh1billion
Hello all,

I recently tested switching my server from PHP4 to PHP5 (in my hosting account's web panel), and a problem arose: users could no longer log in until I switched back to PHP 4.

Basically, the following line was returning "true" in PHP4 but "false" in PHP5:

Code: Select all

isset($HTTP_COOKIE_VARS['foo'])
..with "foo" being the name of the cookie, of course (replaced in this post for sake of example/simplicity).

---

So, what is the difference between cookie usage in PHP4 and PHP5, if any?

Re: Difference in cookies between PHP4 and PHP5?

Posted: Wed Mar 12, 2008 1:53 am
by Chris Corbyn
$_COOKIES, obviously the server had register_long_arrays = Off (rightly so).

Re: Difference in cookies between PHP4 and PHP5?

Posted: Wed Mar 12, 2008 6:01 pm
by Josh1billion
Ah that worked, thanks Chris!