|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-04-17 19:21 UTC] haakonsk at gmail dot com
Description:
------------
Apache crashes when strftime is called inside a user-defined session write function. It doesn't seem to be a problem for the other user-defined session functions (at least not open, close or read).
Reproduce code:
---------------
session_set_save_handler('sess_open',
'sess_close',
'sess_read',
'sess_write',
'sess_destroy',
'sess_gc');
function sess_write($id, $sess_data)
{
$time = strftime("%d %b %Y %H:%M:%S");
return true;
}
Expected result:
----------------
No crash
Actual result:
--------------
Apache crashes.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 11:00:02 2025 UTC |
I haven't been able to generate the backtrace (need help/directions). This problem is also present with PHP5.1.3. Complete code example (result: apache crashes): <?php session_set_save_handler('sess_open', 'sess_close', 'sess_read', 'sess_write', 'sess_destroy', 'sess_gc'); session_start(); print_r($_SESSION); $_SESSION['test'] = 2; function sess_open($sess_path, $sess_name) { return true; } function sess_close() { return true; } function sess_read($id) { return true; } function sess_write($id, $sess_data) { $year = strftime("%Y"); return true; } function sess_destroy($id) { return true; } function sess_gc($max_lifetime) { return true; } ?>