PDOException: could not find driver (postgres)

What could be causing this please? Going direct, using pg_connect, is
not a problem.

The code in question looks like
$pdo = new PDO('pgsql:host=localhost;port=5432;dbname=mydb', 'dbuser',
'dbpass');
(I think - I've yet to be able to debug it down to a single line)

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
php-db [ Do, 22 April 2010 12:16 ] [ ID #2039967 ]

Re: PDOException: could not find driver (postgres)

> What could be causing this please? Going direct, using pg_connect, is
> not a problem.

Seems like a simple missing driver problem. Make sure you have the PDO
postgres driver enabled in your php.ini, it does not use the same driver
as the Postgres extension.

> The code in question looks like
> $pdo = new PDO('pgsql:host=localhost;port=5432;dbname=mydb', 'dbuser',
> 'dbpass');
> (I think - I've yet to be able to debug it down to a single line)



--
Niel Archer
niel.archer (at) blueyonder.co.uk



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Niel Archer [ Do, 22 April 2010 12:44 ] [ ID #2039968 ]

Re: PDOException: could not find driver (postgres)

On 4/22/10, Niel Archer wrote:
>> What could be causing this please? Going direct, using pg_connect, is
>> not a problem.

> Make sure you have the PDO
> postgres driver enabled in your php.ini, it does not use the same driver
> as the Postgres extension.

Aha! Okay, thanks! It's working now...

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
php-db [ Do, 22 April 2010 14:52 ] [ ID #2039969 ]
PHP » gmane.comp.php.database » PDOException: could not find driver (postgres)

Vorheriges Thema: session management
Nächstes Thema: Sharing happiness!!