#23457 [Opn->Ver]: PHP crashes
ID: 23457
Updated by: nicos@php.net
Reported By: xdanny at email dot cz
-Status: Open
+Status: Verified
Bug Type: Date/time related
-Operating System: Windows 2000
+Operating System: ANY
PHP Version: 4.3.2RC1
New Comment:
I have the same problem with PHP5:
[Sun May 4 - 12:08:17 - nicos ~]$ php
<?php
//define(DATEFORMAT, 'Y/m/d');
$timestamp = Time();
$today = Date(DATEFORMAT, $timestamp);
echo "Hi, today is $today";
?>
Hi, today is SunPMCESTEMay+0200RMayPMCEST
[Sun May 4 - 12:08:19 - nicos ~]$
PHP 5.0.0-dev (cli) (built: Apr 27 2003 15:59:15)
Copyright (c) 1997-2003 The PHP Group
Zend Engine v2.0.0-dev, Copyright (c) 1998-2003 Zend Technologies
Same with :
PHP 4.3.2-RC1 (cli) (built: May 1 2003 19:59:00)
Copyright (c) 1997-2003 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies
Shouldn't it print an E_FATAL when we're using an undefined constant?
Previous Comments:
------------------------------------------------------------------------
[2003-05-02 17:52:12] xdanny at email dot cz
My environment is PHP 4.3.2 RC1 on W2K with IIS ISAPI module. Don't
exactly know - I only suppose that this problem is related more to Date
function than to IIS - i don't have enough systems to test on. In
normal situation you should have all constants set up, thats true, but
if any of your customers run wrong script on your server machine, he
could cause crash of whole IIS.
The symptom is simple: If you use not defined constant in date format
parameter of Date() function it causes Access violation and crashes
IIS.
PHP has encountered an Access Violation at 014FD4EB
A script causing PHP
<?php
//define(DATEFORMAT, 'Y/m/d');
$timestamp = Time();
$today = Date(DATEFORMAT, $timestamp);
echo "Hi, today is $today";
?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=23457&edit=1
Thread (7 messages)