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

1

3 Answers 3

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.

Sign up to request clarification or add additional context in comments.

Comments

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

Comments

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.