php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #52054 Class 'PDO' not found
Submitted: 2010-06-11 20:31 UTC Modified: 2010-06-12 15:59 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: deuce at gt dot rr dot com Assigned:
Status: Not a bug Package: PDO related
PHP Version: 5.2.13 OS: linux kernel 2.6.27-grsec4
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: deuce at gt dot rr dot com
New email:
PHP Version: OS:

 

 [2010-06-11 20:31 UTC] 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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-06-12 15:14 UTC] felipe@php.net
-Status: Open +Status: Bogus
 [2010-06-12 15:14 UTC] felipe@php.net
I got the message: "could not find driver"... PDO seems not be enabled in your instalation.
 [2010-06-12 15:59 UTC] deuce at gt dot rr dot com
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.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Mar 09 11:01:23 2021 UTC