#31454 [Opn->Csd]: session_set_save_handler crashes PHP when supplied non-existent object ref.

From: Date: Sun, 09 Jan 2005 17:58:18 +0000
Subject: #31454 [Opn->Csd]: session_set_save_handler crashes PHP when supplied non-existent object ref.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-71638@lists.php.net to get a copy of this message
ID: 31454 Updated by: tony2001@php.net Reported By: irchtml@php.net -Status: Open +Status: Closed Bug Type: Reproducible crash Operating System: Windows XP PHP Version: 5.0.3 New Comment: This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2005-01-09 15:37:04] irchtml@php.net Description: ------------ When supplying a non-existent object reference as a callback, session_set_save_handler() hangs for a moment and php crashes, taking Apache with it. 5.0.3 win32 release, Apache1 SAPI, recommended ini, no external modules loaded. Also tested with 5.0.2, setup same as above. Reproduce code: --------------- <?php class Foo { function Foo() { session_set_save_handler( array(&$arf, 'open'), array(&$arf, 'close'), array(&$arf, 'read'), array(&$arf, 'write'), array(&$arf, 'destroy'), array(&$arf, 'gc')); } } $foo =& new Foo(); echo 'bar!'; ?> Expected result: ---------------- The string "bar!" should be output. Actual result: -------------- No output, PHP crashes, taking Apache child with it. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=31454&edit=1

« previous php.bugs (#71638) next »