ID: 23835 Updated by: [EMAIL PROTECTED] Reported By: kruemelmonster at cookiecan dot de -Status: Bogus +Status: Open Bug Type: Documentation problem PHP Version: 4.3.2RC4 New Comment:
I don't agree that this is not a bug. The reference refers that the netscape info, and there the expiration date is a string. This time->string conversion is done by PHP however. This is not documented. Also some links to the new RFCs would be good. They are more official then the Netscape docs. Even if we don't support all of the options fully. BTW the question that the setcookie function needs a maxage paramater is a feature request, please open another bug as a feature request for that. Previous Comments: ------------------------------------------------------------------------ [2003-05-27 12:11:34] [EMAIL PROTECTED] 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. ------------------------------------------------------------------------ [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