#33283 [NEW]: Apache GPF's when attempting to use PDO
| From: | david dot prusak at copart dot com | Date: | Thu, 09 Jun 2005 15:56:54 +0000 |
| Subject: | #33283 [NEW]: Apache GPF's when attempting to use PDO | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-80094@lists.php.net to get a copy of this message | ||
From: david dot prusak at copart dot com
Operating system: Windows XP
PHP version: 5.0.4
PHP Bug Type: PDO related
Bug description: Apache GPF's when attempting to use PDO
Description:
------------
When attempting to use the PDO class, Apache GPF's.
My PHP.ini reads as follows:
extension_dir = "C:\php\ext"
extension=php_pdo.dll
extension=php_pdo_odbc.dll
Apache/PHP doesn't alert me that the libraries couldn't be loaded.
The code provided is 100% reproducable on my system.
Removing all the code except the database connection doesn't crash. The
code does say that the connection was established.
I'm not 100% sure if it's php or my php.ini file. The backtrace tells me
that the class doesn't exist. That leaves me with a suspicion that it
could be config related.
Reproduce code:
---------------
<?php
try {
$dbh = new PDO('odbc:IBMDB2', 'USER', 'PASS',
array(PDO_ATTR_PERSISTENT => true));
echo "Connected\n";
} catch (Exception $e) {
echo "Failed: " . $e->getMessage();
}
$email = "me@somewhere.com";
$stmt = $dbh->prepare("CALL SPROC(?, ?)");
$stmt->bindParam(1, $email);
$stmt->bindParam(2, $return_value, PDO_PARAM_STR, 80);
$stmt->execute();
print "procedure returned $return_value\n";
?>
Expected result:
----------------
Results from the database without error
Actual result:
--------------
(gdb) target exec C:\php\php.exe
(gdb) run test.php
Starting program: /cygdrive/c/php/php.exe test.php
PHP Fatal error: Class 'PDO' not found in c:\Documents and
Settings\dmprusak1\My Documents\htdocs_80\pages\project_manager\test.php
on line 17
Fatal error: Class 'PDO' not found in c:\Documents and
Settings\dmprusak1\My Documents\htdocs_80\pages\project_manager\test.php
on line 17
Program received signal SIGSEGV, Segmentation fault.
0x77ea3c00 in RpcRaiseException ()
from /cygdrive/c/WINDOWS/system32/rpcrt4.dll
--
Edit bug report at http://bugs.php.net/?id=33283&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33283&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33283&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33283&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=33283&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=33283&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=33283&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=33283&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=33283&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=33283&r=support
Expected behavior: http://bugs.php.net/fix.php?id=33283&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=33283&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=33283&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=33283&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33283&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=33283&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=33283&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=33283&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=33283&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=33283&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=33283&r=mysqlcfg