#36752 [Opn->Asn]: pdo_odbc crashes apache

From: Date: Tue, 28 Mar 2006 12:36:19 +0000
Subject: #36752 [Opn->Asn]: pdo_odbc crashes apache
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-94992@lists.php.net to get a copy of this message
 ID:               36752
 Updated by:       tony2001@php.net
 Reported By:      mauroi at digbang dot com
-Status:           Open
+Status:           Assigned
 Bug Type:         PDO related
 Operating System: Win XP SP2
 PHP Version:      5CVS-2006-03-16 (snap)
-Assigned To:      
+Assigned To:      wez


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

[2006-03-28 14:26:53] mauroi at digbang dot com

Yes.
The same happens.

Thanks.

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

[2006-03-28 12:30:06] tony2001@php.net

Please try using this CVS snapshot:

  http://snaps.php.net/php5.1-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.1-win32-latest.zip



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

[2006-03-16 00:14:45] mauroi at digbang dot com

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 this bug report at http://bugs.php.net/?id=36752&edit=1


Thread (10 messages)

« previous php.bugs (#94992) next »