#37822 [Opn]: Using PDO from CLI script results in seg fault
| From: | toolbag at gmail dot com | Date: | Fri, 16 Jun 2006 15:47:17 +0000 |
| Subject: | #37822 [Opn]: Using PDO from CLI script results in seg fault | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-98418@lists.php.net to get a copy of this message | ||
ID: 37822
User updated by: toolbag at gmail dot com
Reported By: toolbag at gmail dot com
Status: Open
Bug Type: Reproducible crash
Operating System: GNU/Linux kernel 2.4.21
PHP Version: 5.1.4
New Comment:
After more poking around I have determined that this is only a problem
when a PDO object with driver type of Oracle is used. Trying to create
an empty PDO objects results in missing parameters (good!) but once the
"oci:dbname=<db>" argument is thrown in, the seg fault appears. We are
re-compiling with debugging enabled, so hopefully soon I can provide
more info.
Previous Comments:
------------------------------------------------------------------------
[2006-06-15 23:13:52] toolbag at gmail dot com
Description:
------------
Instantiating a PDO object from a PHP script that is called from the
CLI results in a seg fault. Running the same script from a browser is
perfectly ok. I am using PDO + PDO_OCI in a large web app with no
problems, but when I coded up some PDO/OCI code to run within a
cronjob, this happens.
Reproduce code:
---------------
<?php
try {
$dbh = new PDO("oci:dbname=<host>", "<user>",
"<pass>");
}catch(PDOException $e) {
die("Error: " . $e->getMessage() );
}
$dbh = null;
echo "I am never reached";
?>
Expected result:
----------------
From the browser I see: "I am never reached".
From the CLI: immediate seg fault.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=37822&edit=1