#48851 [Asn]: calling setcookie with "invalid time value" causes high load for apache process

From: Date: Fri, 10 Jul 2009 19:32:08 +0000
Subject: #48851 [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-139599@lists.php.net to get a copy of this message
ID: 48851 Updated by: derick@php.net Reported By: stephan dot schulze at kapthon dot com Status: Assigned Bug Type: Date/time related Operating System: Centos 5.3 PHP Version: 5.2.10 Assigned To: derick New Comment: It is in 5.3. Previous Comments: ------------------------------------------------------------------------ [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 http://bugs.php.net/?id=48851&edit=1

« previous php.bugs (#139599) next »