Bug #52054 [Opn->Bgs]: Class 'PDO' not found

From: Date: Sat, 12 Jun 2010 13:14:32 +0000
Subject: Bug #52054 [Opn->Bgs]: Class 'PDO' not found
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-151373@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=52054&edit=1

 ID:               52054
 Updated by:       felipe@php.net
 Reported by:      deuce at gt dot rr dot com
 Summary:          Class 'PDO' not found
-Status:           Open
+Status:           Bogus
 Type:             Bug
 Package:          PDO related
 Operating System: linux kernel 2.6.27-grsec4
 PHP Version:      5.2.13

 New Comment:

I got the message: "could not find driver"... PDO seems not be enabled
in your instalation.


Previous Comments:
------------------------------------------------------------------------
[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


Thread (3 messages)

« previous php.bugs (#151373) next »