I just changed my server's OS from WinXP to Win2k, all of a sudden my cookie reading script isn't working. It seems that it isn't reading anything from the $_COOKIE var. Is there any reason that this variable would all of a sudden stop working? Register_globals is on. In the phpinfo, the cookie info is all there but the $_COOKIE doesn't seem to work.
Dec 11, 2003, 2:13 AM
Veteran / Moderator (18441 posts)
Dec 11, 2003, 2:13 AM
Post #2 of 4
Views: 6099
So the following doesn't give you anything?
global $_COOKIE;
echo "Values held in \$_COOKIE<BR><BR>";
foreach ($_GLOBALS as $name => $val) {
echo "$name => $val <BR>";
}
?>
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Code:
<?php global $_COOKIE;
echo "Values held in \$_COOKIE<BR><BR>";
foreach ($_GLOBALS as $name => $val) {
echo "$name => $val <BR>";
}
?>
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Dec 11, 2003, 1:07 PM
User (81 posts)
Dec 11, 2003, 1:07 PM
Post #4 of 4
Views: 6061
I found the problem. I had a previous copy of PHP installed on my server and when I removed it, I didn't remove the .ini file from my winnt directory. Once moved, reinstalled, everything is working perfectly. Including all those pages that weren't working from not loading before.