Re: PDOException: could not find driver (postgres)
| From: | Niel Archer | Date: | Thu, 22 Apr 2010 10:44:09 +0000 |
| Subject: | Re: PDOException: could not find driver (postgres) | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-47077@lists.php.net to get a copy of this message | ||
> 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