hopefully somebody can help.
I have a new installation of homestead with a laravel 4.2 application making use of postgresql.
The error in the log file when trying to interact with the db is: local.ERROR: exception 'PDOException' with message 'could not find driver' in :
I have tested the following: 1. According to a phpinfo(); page php is configured with pdo + pdo_pgsql 2. Verified no 1 with the following code: ```php
foreach (PDO::getAvailableDrivers() as $driver)
{
echo $driver . '<br />';
}
$dbh = new PDO ('pgsql:host=xxxx;dbname=xxxx', 'xxxx', 'xxxx')
or die ("Error");
try {
$dbh = new PDO('pgsql:host=xxxx;dbname=xxxx', 'xxxx', 'xxxx');
foreach($dbh->query('SELECT * from users') as $row) {
print_r($row);
}
$dbh = null;
} catch (PDOException $e) {
print "Error!: " . $e->getMessage() . "<br/>";
die();
}
``` which produced the following output:
mysql
pgsql
sqlite
Array ( [id] => 1 .........................................
3. I can run php artisan migrate and php artisan tinker and create the db tables and create db entries.
Thus I have determined the following: 1. PHP is running and configured correctly via both web and cli 2. Postgresql is running and accessible via artisan 3. I don't know why the laravel web interaction with pgsql is not working
I am at my wits end and would appreciate any help.
I have tried the following articles in my search for sanity: