yousafHarry
yousafHarry

Reputation: 133

Laravel: Error [PDOException]: Could not Find Driver in PostgreSQL?

I am trying to connect PostgreSQL with Laravel 5.0 but facing exception "Could not Find Driver in PostgreSQL".

I have tried this solution but cannot connected with PostgreSQL

stackoverflow answer

My database.php config file is following

'default' => 'pgsql'

            'pgsql' => [
                'driver'   => 'pgsql',
                'host'     => env('DB_HOST', 'localhost'),
                'database' => env('DB_DATABASE', 'forge'),
                'username' => env('DB_USERNAME', 'forgeUser'),
                'password' => env('DB_PASSWORD', '****'),
                'charset'  => 'utf8',
                 'prefix'   => '',
                'schema'   => 'public',
                'port'     => 5432,
            ]

PDO extensions are enabled in php.ini

extension=php_pdo.dll

extension=php_pdo_pgsql.dll

when i run following command

php artisan migrate

it gives error

[PDOException] could not find driver

Its working fine when we connect PostgreSQL with Core PHP.

is there any driver still missing in Laravel? Please guide me.

Thank You

Upvotes: 6

Views: 2403

Answers (1)

lukeed
lukeed

Reputation: 469

You must be ssh'd into your homestead or vagrant box. Then try to migrate.

Upvotes: 2

Related Questions