#37111 [Opn]: Apache crashes when strftime is called inside user defined session write func

From: Date: Mon, 17 Apr 2006 19:53:33 +0000
Subject: #37111 [Opn]: Apache crashes when strftime is called inside user defined session write func
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-95897@lists.php.net to get a copy of this message
 ID:               37111
 User updated by:  haakonsk at gmail dot com
 Reported By:      haakonsk at gmail dot com
 Status:           Open
 Bug Type:         Session related
 Operating System: Windows XP
 PHP Version:      5.1.2
 New Comment:

Apache also crashes when getdate or date is called instead of strftime.
However, the "time" function does not cause Apache to crash.


Previous Comments:
------------------------------------------------------------------------

[2006-04-17 19:21:49] 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.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=37111&edit=1


Thread (29 messages)

« previous php.bugs (#95897) next »