ID:          23835
 Updated by:  [EMAIL PROTECTED]
 Reported By: kruemelmonster at cookiecan dot de
-Status:      Open
+Status:      Bogus
 Bug Type:    Documentation problem
 PHP Version: 4.3.2RC4
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

The parameter you pass to setcookie() as a timestamp gets converted to
a date as specified by the rfc automatically. And there is nothing
wrong with using the netscape specification, it is supported by the
broadest range of browsers.


Previous Comments:
------------------------------------------------------------------------

[2003-05-27 11:25:56] kruemelmonster at cookiecan dot de

the documentation of setcookie() suffers major inconsistencies.


from the setcookie() man page:

--------------------------------------------
expire:
The time the cookie expires. This is a unix timestamp so is in number
of seconds since the epoch. In otherwords, you'll most likely set this
with the time() function plus the number of seconds before you want it
to expire. Or you might use mktime(). 
--------------------------------------------

refers to the old netscape-spec
http://www.netscape.com/newsref/std/cookie_spec.html 
which clearly states: 

--------------------------------------------
expires=DATE 
The expires attribute specifies a date string that defines the valid
life time of that cookie. Once the expiration date has been reached,
the cookie will no longer be stored or given out. 
The date string is formatted as: 

Wdy, DD-Mon-YYYY HH:MM:SS GMT
This is based on RFC 822, RFC 850, RFC 1036, and RFC 1123,... [snip]
--------------------------------------------

unix_ts <?> datestring?    what gives?

please also consider the new specs published by the ietf:
http://www.ietf.org/rfc/rfc2109.txt
http://www.ietf.org/rfc/rfc2965.txt 
as posted by a user, implementing 'max-age'. 
 
either remove the explanation completely or correct it with a list of
the type:

expires:
   - unix_ts
   - datestring
and you might want to include max_age


thanx



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=23835&edit=1


-- 
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to