#45208 [Opn->Fbk]: getdate() causes a segfault
ID: 45208
Updated by: jani@php.net
Reported By: ncoesel at dealogic dot nl
-Status: Open
+Status: Feedback
Bug Type: Date/time related
Operating System: Linux
PHP Version: 5.2.6
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows (zip):
http://snaps.php.net/win32/php5.2-win32-latest.zip
For Windows (installer):
http://snaps.php.net/win32/php5.2-win32-installer-latest.msi
Previous Comments:
------------------------------------------------------------------------
[2008-06-08 13:29:24] ncoesel at dealogic dot nl
Yes, installing the timezone data fixed the problem! This still leaves
the pointer checking issue so the user simply gets no data or an error
message :-)
------------------------------------------------------------------------
[2008-06-08 13:19:01] ncoesel at dealogic dot nl
Looking at the source of getdate() it strikes me several 'foreign'
pointers are used before being checked. From this I suspect there is
something wrong with the timezone settings on my machine.
------------------------------------------------------------------------
[2008-06-08 12:49:52] ncoesel at dealogic dot nl
Description:
------------
Calling getdate causes a segfault after upgrading from PHP Version
4.3.2 to PHP Version 5.2.6-1.
Reproduce code:
---------------
<?php
$d=getdate();
print_r($d);
?>
Or
<?php
$curtime=time();
$d=getdate($curtime);
print_r($d);
?>
Expected result:
----------------
Array ( [seconds] => 18 [minutes] => 50 [hours] => 13 [mday] => 8
[wday] => 0 [mon] => 6 [year] => 2008 [yday] => 159 [weekday] => Sunday
[month] => June [0] => 1212925818 )
Actual result:
--------------
Segfault message in Apache log
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=45208&edit=1
Thread (5 messages)