#48851 [Opn->Asn]: calling setcookie with "invalid time value" causes high load for apache process
| From: | jani@php.net | Date: | Fri, 10 Jul 2009 18:52:35 +0000 |
| Subject: | #48851 [Opn->Asn]: 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-139598@lists.php.net to get a copy of this message | ||
ID: 48851
Updated by: jani@php.net
Reported By: stephan dot schulze at kapthon dot com
-Status: Open
+Status: Assigned
-Bug Type: Apache2 related
+Bug Type: Date/time related
Operating System: Centos 5.3
PHP Version: 5.2.10
-Assigned To:
+Assigned To: derick
New Comment:
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?
Previous Comments:
------------------------------------------------------------------------
[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 http://bugs.php.net/?id=48851&edit=1