Bug #48851 [Asn->Nab]: calling setcookie with "invalid time value" causes high load for apache process
| From: | derick@php.net | Date: | Mon, 19 Jan 2015 23:06:13 +0000 |
| Subject: | Bug #48851 [Asn->Nab]: calling setcookie with "invalid time value" causes high load for apache process | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-190064@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=48851&edit=1
ID: 48851
Updated by: derick@php.net
Reported by: stephan dot schulze at kapthon dot com
Summary: calling setcookie with "invalid time value" causes
high load for apache process
-Status: Assigned
+Status: Not a bug
Type: Bug
Package: Date/time related
Operating System: Centos 5.3
PHP Version: 5.2.10
Assigned To: derick
Block user comment: N
Private report: N
New Comment:
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP --
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php
If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.
This is fixed in 5.3 and later.
Previous Comments:
------------------------------------------------------------------------
[2009-07-10 19:32:07] derick@php.net
It is in 5.3.
------------------------------------------------------------------------
[2009-07-10 18:52:35] jani@php.net
This loop in ext/date/lib/unixtime2tm.c seems to be the problem:
while (tmp_days >= DAYS_PER_LYEAR) {
..
}
Derick, can that be optimized for such huge timestamps?
------------------------------------------------------------------------
[2009-07-08 09:16:23] stephan dot schulze at kapthon dot com
Description:
------------
If you call setcookie with an invalid time value causes high load for the calling apache process
Reproduce code:
---------------
setcookie("SessionID", $S, time() . 15768000, "/");
Expected result:
----------------
Cookie is set and there should be no load for the apache process
Actual result:
--------------
Cookie is set and there is a load of 100% for the apache process
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=48851&edit=1