#42075 [NEW]: pdo_oci crash (with persistent connection) when couldn't connect to db
From: romande at gmail dot com
Operating system: linux (2.4.21-49.EL)
PHP version: 5.2.3
PHP Bug Type: PDO related
Bug description: pdo_oci crash (with persistent connection) when couldn't connect to db
Description:
------------
pdo_oci crash when trying to connect to db with bad instance name/or user
name/ or password, or db is down.
Reproduce code:
---------------
make $db to point to not existing db instance/to db which is down
include("config.inc");
try{
$this->conn = new PDO($db, $db_username,$db_password,
array(PDO::ATTR_PERSISTENT => true));
}catch (PDOException $e)
{
include("config.inc");
$logger = &Log::singleton('file', $file, 'DBManager.php', $conf,
$logLevel);
$logger->log("Failed connecting to DB: ".$e->getMessage(),
PEAR_LOG_ERR);
// $logger->log("DB error. Continuing without DB.", PEAR_LOG_INFO);
}
Expected result:
----------------
It's expected that "catch" statement will catch the exception
Actual result:
--------------
script crashes with message in apache log:
*** glibc detected *** free(): invalid pointer: 0xb71e6ec4 ***
[Mon Jul 23 09:08:17 2007] [notice] child pid 7065 exit signal Aborted (6)
--
Edit bug report at http://bugs.php.net/?id=42075&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42075&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42075&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42075&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=42075&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=42075&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=42075&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=42075&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=42075&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=42075&r=support
Expected behavior: http://bugs.php.net/fix.php?id=42075&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=42075&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=42075&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=42075&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42075&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=42075&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=42075&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=42075&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=42075&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=42075&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=42075&r=mysqlcfg
Thread (5 messages)
- romande at gmail dot com