cookie stopped working???

From: Date: Sat, 13 Jan 2001 19:18:17 +0000
Subject: cookie stopped working???
Groups: php.general 
Request: Send a blank email to php-general+get-34390@lists.php.net to get a copy of this message
Greetings all, I left the php list a few years ago when I lost the clients who wanted (could afford) php scripts (I'm still using 2.12b..lol). Several scripts are still running well after all these years. Now, I'm building an online programming resume for myself and using php/msql to track potential employers as they visit. I'm using a cookie to set a visitor id, then I read the cookie on each page and make database updates to track page/timeonpage visiting sequence. If no cookie is found then it must be the first visit and a small login window opens to enter name/email. On submit, a db record is created and visitor id assigned and put in cookie and db field. That way I can track all visits from the cookie id regardless of number of different visits. It was all working perfectly two days ago. I got up yesterday to polish a few other things and found that I can't get php to read any cookies. It has to be a read problem because I can't get the cookie that was set when it was working the day before. This is a problem for all three of my browsers on two machines as well some friends who tried it out. It could be an expires problem, but I didn't do anything to that either. Here is the set cookie from the new db record visitor script: $vin is a random 6 character string calculated before the set cookie SetCookie("cpvin","$vin","time()+1500"); I also tried: SetCookie("cpvin","$vin","Monday, 31-12-01 23:59:59 GMT"); (this is what I was using when it worked, then stopped) All variables pass and record creation works... just can't set or read the cookie? As far as the read on each page: if ($cpvin);//already been set update database entry on $cpvin else; $firstvisit = "yes"; endif; Today I tried putting: $cpvin = $HTTP_COOKIE_VARS["cpvin"]; at the top.. no luck there either. Later in the script there is an: onload() JavaScript which opens the login box when $firstvisit = yes. The site is at: http://donhowland.com (that's me) feel free to register as often as you like, it's not ready to open until I get this last item working and I'll dump the database when I open it. I have a cookie check section at the top so I can see the cookie status. Any ideas of what whet wrong? I didn't do anything that I know of. If you want to respond please contact me directly, as I'm not currently on the list. Thanks for any ideas, Don Howland howland@donhowland.com PS. I'm working on a url encoded id to track visitors until I can figure out what happened. It will work by not as smoothly as the cookie.

« previous php.general (#34390) next »