Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.2.1

Bug #2063 error msg gmdate()
Submitted: 2004-08-05 11:02 UTC
From: cpuidle at gmx dot de Assigned: mike
Status: Closed Package: HTTP_Header
PHP Version: 5.0.0 OS: WinXP
Roadmaps: (Not assigned)    
Subscription  


 [2004-08-05 11:02 UTC] cpuidle at gmx dot de
Description: ------------ Error message: Warning: gmdate() [function.gmdate]: Windows does not support dates prior to midnight (00:00:00), January 1, 1970 in C:\Program Files\php\PEAR\HTTP.php on line 57 Reproduce code: --------------- <?php require_once 'HTTP/Header/Cache.php'; // only cache a few seconds for frequently // changing pages like a forum; // Header_Cache will exit automatically with // "HTTP 304 Not Modified" if the page is // requested twice within 3 seconds $cache = &new HTTP_Header_Cache(3, 'seconds'); $cache->sendHeaders(); // ... load from file/db cache // ... or rebuild page ?> Reload page with IE, 2nd time the error appears Expected result: ---------------- no error Actual result: -------------- Error message: Warning: gmdate() [function.gmdate]: Windows does not support dates prior to midnight (00:00:00), January 1, 1970 in C:\Program Files\php\PEAR\HTTP.php on line 57

Comments

 [2004-08-05 11:48 UTC] mike
Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to "Open". Thank you for your interest in PEAR. I cannot reproduce this with PHP 5RC3 on Win2k. Did you use latest version of HTTP and HTTP_Header?
 [2004-08-05 12:56 UTC] cpuidle at gmx dot de
Not sure what else you need. Code is sample code supposed create caching headers to lessen HTTP server load. Server is Apache2 on localhost, Browser is IE6. After loading the page, then clicking 'reload' the issue appears. The problem only appears with direct connection, when going why proxy it doesn't happen.
 [2004-08-05 13:00 UTC] cpuidle at gmx dot de
The error only happens the second time. Headers sent by IE first time are: GET /caching.php HTTP/1.1 Accept: */* Accept-Language: en-us,de;q=0.5 Accept-Encoding: gzip, deflate If-Modified-Since: Thu, 05 Aug 2004 12:57:27 GMT; length=0 User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322) Host: supportweb.dyndns.org Connection: Keep-Alive Cookie: ZDEDebuggerPresent=php,phtml,php3 Answer: HTTP/1.0 200 OK Date: Thu, 05 Aug 2004 12:57:27 GMT Server: Apache/2.0.50 (Win32) mod_ssl/2.0.50 OpenSSL/0.9.7d PHP/5.0.0 X-Powered-By: PHP/5.0.0 Set-Cookie: ZDEDebuggerPresent=php,phtml,php3 pragma: cache, no-cache cache-control: public, no-store, no-cache, must-revalidate, post-check=0, pre-check=0 last-modified: Thursday, 05-Aug-04 12:57:27 GMT Content-Encoding: gzip Content-Length: 20 Connection: close Content-Type: text/html; charset=ISO-8859-1 Headers send by IE second time are: GET /caching.php HTTP/1.1 Accept: */* Accept-Language: en-us,de;q=0.5 Accept-Encoding: gzip, deflate If-Modified-Since: Thu, 05 Aug 2004 12:57:27 GMT; length=0 User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322) Host: supportweb.dyndns.org Connection: Keep-Alive Cookie: ZDEDebuggerPresent=php,phtml,php3 Answer: HTTP/1.0 200 OK Date: Thu, 05 Aug 2004 12:57:29 GMT Server: Apache/2.0.50 (Win32) mod_ssl/2.0.50 OpenSSL/0.9.7d PHP/5.0.0 X-Powered-By: PHP/5.0.0 Set-Cookie: ZDEDebuggerPresent=php,phtml,php3 Content-Encoding: gzip Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Content-Length: 197 Connection: close Content-Type: text/html; charset=ISO-8859-1
 [2004-08-05 13:06 UTC] mike
Ahhhh... I already see the evil piece: If-Modified-Since: Thu, 05 Aug 2004 12:57:27 GMT; length=0 I'll fix it ASAP! Thanks a lot for the report, Mike
 [2004-08-05 13:12 UTC] mike
Thank you for your bug report. This issue has been fixed in the latest released version of the package, which you can download at http://pear.php.net/get/HTTP_Header Note: Bug was in HTTP_Header.