setcookie not working on new server

From: Date: Tue, 27 Jun 2000 18:31:28 +0000
Subject: setcookie not working on new server
Groups: php.general 
Request: Send a blank email to php-general+get-3390@lists.php.net to get a copy of this message
Ok, I know there are tons of cookie Q&A out there, but I can't find an answer to help me. The problem is, I've been developing this site for a couple of months on NT (PHP3.0.16 & IIS). I use cookies to track the user. In preparation for moving the site to the production server, I tested it on a Linux system with PHP4 & Apache (don't know what version). On both the development and test servers, the cookies worked fine. Now, on my development server, it doesn't work on IE! The production server is PHP3 and Apache. The code for setcookie is: // Begin Code setcookie("user_name", $user, (time()+TIME_OUT), "/vet/", "www.myserver.com", 0); setcookie("user_hash", $hash, (time()+TIME_OUT), "/vet/", "www.myserver.com", 0); setcookie("user_id", $arArray["uID"], (time()+TIME_OUT), "/vet/", "www.myserver.com", 0); echo "<html><head>" . "<META http-equiv=refresh content='0; url=home.php3'>" . "</head></html>"; exit; // End code The variables are set correctly prior to calling setcookie, TIME_OUT is a constant defined to 1200 (20 minutes). I have also tried this without the last three parameters, that didn't work. Also with "/" as the directory. Would different versions of Apache and PHP have anything to do with it? I don't see what else would be causing the problem.

« previous php.general (#3390) next »