From:             [EMAIL PROTECTED]
Operating system: Red Hat Linux 7.0
PHP version:      4.0.4pl1
PHP Bug Type:     *Session related
Bug description:  session_set_cookie_params(time()) is setting wrong time

I wrote the following small script :

$user = "libo";
session_register ("user");
setcookie ("TestCookie", "lalala", time());

if I do a telnet to port 80 on the machine where the script is save I get the 
following result:

GET /tests/test.php HTTP/1.1
Host: lala

HTTP/1.1 200 OK
Date: Wed, 11 Apr 2001 09:58:21 GMT
Server: Apache/1.3.14 (Unix) mod_mp3/0.6 tomcat/1.0 PHP/4.0.4pl1 mod_ssl/2.7.1 
X-Powered-By: PHP/4.0.4pl1
Set-Cookie: PHPSESSID=82b5fe22428248792d7500dd051a76b6; expires=Tue, 20-Jul-32 
19:56:52 GMT; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Set-Cookie: TestCookie=lalala; expires=Wed, 11-Apr-01 09:58:26 GMT
Transfer-Encoding: chunked
Content-Type: text/html

like you can see, the setcookie ("TestCookie", "lalala", time()); is setting the right 
time while session_set_cookie_params(time()); is setting a really strange time ...

Edit Bug report at:

PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to