From: mauroi at digbang dot com Operating system: Win XP SP2 PHP version: 5CVS-2006-03-16 (snap) PHP Bug Type: PDO related Bug description: pdo_odbc crashes apache
Description: ------------ I'm trying to create a class that provides a layer between the programmer and the PDO native class. When running the following code, Apache crashes. Only with the odbc PDO driver. Thanks in advance. Reproduce code: --------------- class db { protected $_Handle; function __construct($dsn) { $this->_Handle = new PDO($dsn); } public function DoSomething() { $a = $this->_Handle->prepare('SELECT * FROM valid_table'); echo $undefined_variable; // or any other error } } function strange($errorNumber, $errorMessage) { echo $errorMessage; exit; // if i take this out everything works as expected } set_error_handler('strange'); $a = new db('odbc:valid_connection_string'); $b = $a->DoSomething(); Expected result: ---------------- The $errorMessage reported by the error handler. And the script execution terminated. Actual result: -------------- Crash -- Edit bug report at http://bugs.php.net/?id=36752&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36752&r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36752&r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36752&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=36752&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=36752&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=36752&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=36752&r=needscript Try newer version: http://bugs.php.net/fix.php?id=36752&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=36752&r=support Expected behavior: http://bugs.php.net/fix.php?id=36752&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=36752&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=36752&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=36752&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36752&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=36752&r=dst IIS Stability: http://bugs.php.net/fix.php?id=36752&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=36752&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=36752&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=36752&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=36752&r=mysqlcfg