ID: 37968
Updated by: derick@php.net
Reported By: corey at motionworks dot com dot my
-Status: Open
+Status: Feedback
Bug Type: Reproducible crash
Operating System: WinXP
PHP Version: 5.1.4
New Comment:
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php
for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php
for Win32
Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2006-06-30 03:57:23] corey at motionworks dot com dot my
Description:
------------
Using any of the following date functions inside a custom session
handler function causes PHP (and associated Apache thread) to crash.
Currently using PHP-CGI.
Functions:
date()
strtotime()
date_default_timezone_get()
time() - Works and doesnt't cause a crash
Reproduce code:
---------------
function sess_open($strSavePath, $strSessionName)
{
return true;
}
function sess_close()
{
return true;
}
function sess_read($strKey)
{
return '';
}
function sess_write($strKey, $strVal)
{
$strDate = date('d/m/Y H:i:s');
return true;
}
function sess_destroy($strKey)
{
return true;
}
function sess_gc($intMaxLifetime)
{
return true;
}
session_set_save_handler(
'sess_open',
'sess_close',
'sess_read',
'sess_write',
'sess_destroy',
'sess_gc');
session_start();
sess_write('foo', 'bar');
Expected result:
----------------
It not to crash :-)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=37968&edit=1