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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Sun Oct 27 16:01:27 2024 UTC