#21098 [NEW]: mktime crashes when certain parameters are passed

From: Date: Thu, 19 Dec 2002 15:57:34 +0000
Subject: #21098 [NEW]: mktime crashes when certain parameters are passed
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-28028@lists.php.net to get a copy of this message
From: martin@tack.se Operating system: Windows 2000 PHP version: 4.3.0RC3 PHP Bug Type: Reproducible crash Bug description: mktime crashes when certain parameters are passed The following code makes apache (?) crash. <? $timestamp = 0; $m = date("m",$timestamp); //$m = 01 $y = date("Y",$timestamp); //$m = 1970 $datestamp = mktime(0,0,0, $m, 0, $y); ?> I use Apache 2.0.43 under Windows2k SP3. I have tested against PHP 4.2.3, 4.3.0RC3 and a couple of 4.3.x-dev snapshots from snaps.php.net (from 16-18 dec 2002) Script doesnt crash if either $m or $y is replaced with a 0 in the mktime() call. I found this problem after investigating why a certain script crashed, the reason was some data that i've expected to be in the database actually wasn't. In this case i'd expect to get a false back in $datestamp, or some kind of error message. I've searched the bug database but havent found any similar bug reports. On Linux 2.4.14, PHP 4.2.3, Apache 1.3.27 i can NOT reproduce this problem. -- Edit bug report at http://bugs.php.net/?id=21098&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=21098&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=21098&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=21098&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=21098&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=21098&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=21098&r=support Expected behavior: http://bugs.php.net/fix.php?id=21098&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=21098&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=21098&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=21098&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21098&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=21098&r=dst IIS Stability: http://bugs.php.net/fix.php?id=21098&r=isapi

« previous php.bugs (#28028) next »