ID: 14255 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Old Status: Feedback Status: Open Bug Type: HTTP related Operating System: Debian 2.2.19 PHP Version: 4.0.6 New Comment:
yes there are quotes in the line. If you remove the quotes, the cookie doesn't initialize at all. Should we be assigning a variable there instead for example : $mytime = time() + 7200; setcookie ("coookiename", "cookievalue", $mytime); ? There have been tones of posts in your setcookie function information about the cookie not working at all if you do not put the "" in there. Previous Comments: ------------------------------------------------------------------------ [2001-11-27 12:56:31] [EMAIL PROTECTED] (switched to feedback status) ------------------------------------------------------------------------ [2001-11-27 12:56:00] [EMAIL PROTECTED] setcookie ("myCookie","Blah","time()+7201"); ^ ^ do you realy have quotes here? -> "time()+7201" as a string would evaluate as zero, so deleting the ccokie instead of setting it ------------------------------------------------------------------------ [2001-11-27 12:43:15] [EMAIL PROTECTED] The problem is simple, in the older versions of php, you could set a cookie and have it available for your specified amount of time from any browser window open. The line was as follows : setcookie ("myCookie","Blah","time()+7201"); The cookie should be set for just over 2 hours. In 4.0.6, If you set the cookie, the time you set is never actually used, and the cookie is destroyed immediately after you close the browser window. Another downside, you cannot access this cookie from another window even if the original window is open. this sounds like an exclusive window session is linked to that cookie, and once the uplink is dropped, so is the cookie. To access the cookie, i've been using : $mycookie = $HTTP_COOKIE_VARS[myCookie]; it will show up in the original window, but not in others. at all! what's up?! :) ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=14255&edit=1 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]