I get an error when wanting to make the connection laravel 5.6 with Postgres and I get error

1

.env file

DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
DB_PORT=5432
DB_DATABASE=p1  
DB_USERNAME=postgres
DB_PASSWORD=123456tuyyo

file config / database.php

 'default' => env('DB_CONNECTION', 'pgsql'),

[

    
asked by Rudy 05.09.2018 в 21:02
source

1 answer

3

The problem is that you have not enabled the drives or dlls what you have to do is go to the folder where your php is installed, in my case it is: C:\xampp\php where there is a file called php.ini , you open it with administrator privileges and you go to the line 905 (approx) where is the following line:

;extension=pdo_pgsql

one line below 907 has a line:

;extension=pgsql

Then all you have to do is remove the semicolon (;), which is in front of those lines and would look like this.

extension=pdo_pgsql
extension=pgsql

and ready save the changes and it will work correctly.

    
answered by 05.09.2018 / 21:26
source