#31454 [NEW]: session_set_save_handler crashes PHP when supplied non-existent object ref.
| From: | irchtml@php.net | Date: | Sun, 09 Jan 2005 14:37:04 +0000 |
| Subject: | #31454 [NEW]: session_set_save_handler crashes PHP when supplied non-existent object ref. | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-71627@lists.php.net to get a copy of this message | ||
From: irchtml@php.net
Operating system: Windows XP
PHP version: 5.0.3
PHP Bug Type: Reproducible crash
Bug description: session_set_save_handler crashes PHP when supplied non-existent object ref.
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 bug report at http://bugs.php.net/?id=31454&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31454&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31454&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31454&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=31454&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=31454&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=31454&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=31454&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=31454&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=31454&r=support
Expected behavior: http://bugs.php.net/fix.php?id=31454&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=31454&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=31454&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=31454&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31454&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=31454&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=31454&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=31454&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=31454&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=31454&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=31454&r=mysqlcfg