Homestead Laravel Problem with Drive Postgres

Asked

Viewed 156 times

2

Has anyone here ever had this with Homestead and postgresql? My application is giving this error.

Pdoexception could not find driver

I’ve searched some places but nothing...

I appreciate the help!

  • 1

    Tried to enable php.ini? on windows or linux?

  • 1

    Already enabled the driver? in php.ini: Extension=php_pgsql.dll remove ";" to enable and restart the service.

  • I’m new to Homestead’s Nginx. Where is the php.ini file?

  • I’m using the Homestead the way it came. Mine is Mac OS

  • 1

    @Edyonil /etc/php5/apache2/php.ini. Search from this folder. If you are using php5-fpm you will be inside the fpm folder.

  • Thanks juniorb2ss. Find out that the problem was related to HHVM. As I’m new to Nginx, hhvm and Vagrant, I’m biting myself a little. Thank you

Show 1 more comment

1 answer

1

This error occurs because the extension was not found or disabled.

To activate it, go to:

/etc/php5/fpm/

Open the php.ini file, with the editor you prefer.

Look for the line: Extension=php_pdo_pgsql.dll, if commented, ie with ";" at the beginning, remove it and restart the service:

service php5-fpm restart

If you are using apache do the same steps, however, in the folder:

/etc/php5/apache2

If you do not have the library, run the command:

apt-get install php5-pgsql

Restart the service.

  • Hello friend, it’s already installed. Apparently it’s something with HHVM, because I’ve set up Homestead.yaml, removing HHVM. Ai worked.

  • 1

    When so, @Edyonil, you should post the solution as the answer to your own question. So, you avoid the question being "open" (and someone thinks you haven’t solved the problem) and you show a solution to anyone who might have the same problem :D

Browser other questions tagged

You are not signed in. Login or sign up in order to post.