php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5987 PHP crashes when using mktime()
Submitted: 2000-08-05 23:03 UTC Modified: 2001-06-17 04:49 UTC
From: php-bugs at martin-jansen dot de Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0.1 OS: Windows 98
Private report: No CVE-ID: None
 [2000-08-05 23:03 UTC] php-bugs at martin-jansen dot de
By using the following script, the PHP 4.0.1 scripting engine in CGI-Version under Windows 98 crashes:

<?php
echo mktime(1,0,0,1,1,1970,1);
?>

The same script works properly with PHP 3.0.15 in CGI-Version under Win32.

Seemingly the seventh optional parameter is_dst is the problem: Without this parameter the scripting engine does
not crash.

My System is Windows 98 (first version) and the precompiled CGI-Version of PHP 4.0.1

Best Regards,
Martin

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-06 14:53 UTC] stas@php.net
failed to reproduce. Please test latest version and report if it still happens.
 [2000-08-06 16:28 UTC] php-bugs at martin-jansen dot de
I tried the binary-version of PHP 4.0.1pl2 from http://www.php.net and got the same result.

Any hints?
 [2000-08-06 23:46 UTC] hholzgra@php.net
negative timestamp (before 1970 that is) 
                      seem to crash windows time functions ...

see also #4096
 [2000-08-07 00:17 UTC] waldschrott@php.net
crashes me too an W2K
 [2000-08-07 07:19 UTC] stas@php.net
checked again in NT with latest CVS - doesn't crash both in release & debug mode. Could someone provide a backtrace?
 [2000-08-08 08:57 UTC] waldschrott@php.net
this is a dup of 4096
 [2001-04-27 20:04 UTC] jmoore@php.net
This works fine for me now. Please retest with latest win32 binaries from php4win.de or the 4.0.5 binaries and give feedback.

- James
 [2001-04-28 05:59 UTC] php-bugs at martin-jansen dot de
I tested with the latest binary from www.php4win.de
and with the RC6 binary from ftp.phpuk.org.

Both crash when doing the following:

D:\php\php-4.0.5RC6-win32>php
<?php
  echo mktime(1,0,0,1,1,1970,1);
?>
^Z

D:\php\php-4.0.5RC6-win32>

(on Windows 2000 RC2)

- Martin
 [2001-06-17 04:49 UTC] jmoore@php.net
This is fixed:

D:\cvs\php4\Debug_TS>php -v
4.0.7-dev

D:\cvs\php4\Debug_TS>php
<?php
  echo mktime(1,0,0,1,1,1970,1);
?>
^Z
X-Powered-By: PHP/4.0.7-dev
Content-type: text/html

0

Please makesure your using the correct php binary by running php -v. But its totally unreproducable which kinda implies that you have a php binary in your path and are using that rather than the php binary you think you are using.

- James
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 17 09:01:32 2024 UTC