Pdoexception Could Not Find Driver

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'. This message means you need to install and or activate postgresql extension in PHP. This solution works for me: To install postgresql extension sudo apt-get install php-pgsql.

  1. Pdoexception Could Not Find Driver Wamp
  2. Pdoexception Could Not Find Driver Sql Server
  3. Pdoexception Could Not Find Driver Postgres
  4. Pdoexception Could Not Find Driver Sqlsrv
  5. Pdoexception Could Not Find Driver Sqlite
  6. Laravel Could Not Find Driver
Active1 month ago

pdo is working fine with mysql but with pgsql its giving error 'PDOException' with message 'could not find driver' I've installed php5-pgsql package which also includes pdo_pgsql

This package provides a module for PostgreSQL database connections directly from PHP scripts. It also includes the pdo_pgsql module for use with the PHP Data Object extension.

my dsn is pgsql:dbname=DB;host=192.168.0.2I am using Ubuntu 10.04

hakre
164k33 gold badges324 silver badges643 bronze badges
Dipro SenDipro Sen
1,54510 gold badges30 silver badges47 bronze badges

Pdoexception Could Not Find Driver Wamp

8 Answers

1) Have you enabled pgsql.so in php.ini (extension=pgsql.so)?

2) Is you Postgresql listenin on 192.168.0.2 interface? (You can check it by netstat -tpln)

3) How you authenticate your access into Postgresql?

Jan MarekJan Marek
7,1192 gold badges16 silver badges18 bronze badges

This message means you need to install and or activate postgresql extension in PHP

This solution works for me :To install postgresql extension

after, for activating it, uncomment pgsql and pdo-pgsql extensions in etc/php/$PHP_VERSION/apache2/php.ini file

Finally, type :

To restart apache server if you use apache such as was my case..

GomsGoms

Pdoexception Could Not Find Driver Sql Server

Make sure you've uncommented the line that tells php where the Postgres driver is (usually extension=pgsql.so) in the main php.ini file.

newenglandernewenglander

I had the same issue. First of all - check is it enabled in php.ini. Uncomment extension=php_pdo_pgsql..

Ad Infinitum is an atmospheric single-player horror game, which puts you into a World War I setting experienced in a first-person perspective. You find yourself in the trenches of a forlorn battlefield where vicious creatures lurk in the shadows. https://wedomg.netlify.app/ad-infinitum-game.html. Ad Infinitum is an atmospheric single-player horror game, which puts you into a World War I setting seen through a first-person perspective. Ad Infinitum is an atmospheric single-player horror game, which puts you into a World War I setting experienced in a first-person perspective. You find yourself in the trenches of a forlorn battlefield where vicious creatures lurk in the shadows. Ad Infinitum is an atmospheric single-player horror game, which puts you into a World War I setting seen through a first-person perspective. You find yourself in the trenches of a forlorn battlefield where your are being hunted by vicious creatures. Solve puzzles to clear pathways and sneak through trenches to hide from vicious creatures.

than set up extension directory!!

and do not forget to restart server after changing the config.

Max KlaxMax Klax

Here is what I did to solve the problem.

  1. Edit php.ini and remove ; from extension=pdo_pgsql. Also, add extension=pgsql.so to the php.ini file.

  2. Make sure to restart the Apache server before you try to see the result.

Amir Md AmiruzzamanAmir Md Amiruzzaman

Try to remove semicolon in front of

extension=pgsql
extension=pgsql.so

included in your php.ini file

SearchPlease enter your ZIP code OR city and state abbreviationTexas is a state known for its fierce independent streak, and that extends to the way the government is run there. Tx dps driver license office.

Pdoexception Could Not Find Driver Postgres

Not

You can do that from the XAMPP Control Panel.

Antoine Boisier-MichaudPdoexception could not find driver wamp
9392 gold badges11 silver badges22 bronze badges
Rafael MatsumotoRafael Matsumoto

When you do not have postgresql installed on the same machine that is Apache and PHP; you have to install php-pgsql and don't have to add extensions in php.ini manually in Linux (in Windows yes), because redundancies are generated and this does not work (checked in error.log).

Then you can check the existence of the extension enabled automatically in:

Observations: In phpinfo() you will find the directory conf.d/ and the file error.log

Pdoexception Could Not Find Driver Sqlsrv

GL

Pdoexception Could Not Find Driver Sqlite

CORONEL Braian

Laravel Could Not Find Driver

CORONEL Braian
2,9011 gold badge7 silver badges19 bronze badges

Copy libpq.dll from the PHP directory to Apache24bin (or wherever your installation could be).

Pathik Vejani
3,0935 gold badges38 silver badges62 bronze badges
Gabriel KniznikGabriel Kniznik

Not the answer you're looking for? Browse other questions tagged phppostgresqlubuntupdo or ask your own question.

Comments are closed.