0

Fatal error: Uncaught exception 'PDOException' with message 'could not find driver' in /home/kholifah/htdocs/cechcalk.ck/userAuth.php:22 Stack trace: #0 /home/kholifah/htdocs/cechcalk.ck/userAuth.php(22): PDO->__construct('?????pgsql:dbna...') #1 {main} thrown in /home/kholifah/htdocs/cechcalk.ck/userAuth.php on line 22

kholifah
  • 11
  • 2
  • 4

3 Answers3

0

It looks like you are missing module called pdo_pgsql.

Look in your php.ini for a line extension=php_pdo_pgsql.dll. It should be uncommented.

On Ubuntu or other linux distribution you can install PDO driver with something like apt-get install php5-pgsql.

0

I was also facing this problem into xampp now its works for me, May be it will helpful to you also in linux platform lamp or latest version of Php 5.6 - 7.

Just uncomment these lines from php.ini file

extension=pdo_pgsql
extension=pgsql

Example from my php.ini file

enter image description here

0

The earliest answers forgot to mention that you need to restart some services after enabling the following in php.ini file:

extension=pdo_pgsql
extension=pgsql

You need to restart your web server, in my case my using nginx, so I do

sudo systemctl restart nginx.service 

After that I restart php-fpm using:

sudo systemctl restart php-fpm.service

Thats All...cheers

Young Emil
  • 2,220
  • 2
  • 26
  • 37