Edit report at http://bugs.php.net/bug.php?id=52054&edit=1
ID: 52054
User updated by: deuce at gt dot rr dot com
Reported by: deuce at gt dot rr dot com
Summary: Class 'PDO' not found
Status: Bogus
Type: Bug
Package: PDO related
Operating System: linux kernel 2.6.27-grsec4
PHP Version: 5.2.13
New Comment:
If you change the value to a module that is loaded on the server, in
this case
mysql, it goes through as expected.
$dbh = new PDO ("mysql:host={$hostname};dbname={$dbname}", $username,
$pw);
works just fine.
I do not have direct control of these machines, and at this point I
believe it
was a default server configuration error which the host has now
corrected. That
is all I know, if you wish to try and figure out as to why or how
contacting
site5 LLC would be the quickest solution. Beau and/or Graham are two
higher ups
that are familiar with the issue.
Previous Comments:
------------------------------------------------------------------------
[2010-06-12 15:14:30] [email protected]
I got the message: "could not find driver"... PDO seems not be enabled
in your instalation.
------------------------------------------------------------------------
[2010-06-11 20:31:49] deuce at gt dot rr dot com
Description:
------------
When a specific database module is not installed and a PDO object of
this type is
called you receive an error reporting that PDO does not exist.
Test script:
---------------
<?php
$hostname = ""; // host
$dbname = ""; // db name
$username = ""; // username like 'sa'
$pw = ""; // password for the user
try {
$dbh = new PDO ("mssql:host={$hostname};dbname={$dbname}",
$username,
$pw);
} catch (PDOException $e) {
echo "Failed to get DB handle: {$e->getMessage()} \n";
exit;
}
?>
Expected result:
----------------
Failed to get DB handle: could not find driver
Failed to get DB handle: could not find module
etc.
Actual result:
--------------
PHP Fatal error: Class 'PDO' not found in /home/../login.php on line 10
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=52054&edit=1