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
Asked
Active
Viewed 3,423 times
0
-
Check my [answer] (https://stackoverflow.com/a/53661888/5279996) in another similar publication. GL – Braian Coronel Dec 07 '18 at 01:10
3 Answers
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
.

Nejc Zupan
- 9
- 3
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

Md. Salman Fahad Famous
- 963
- 7
- 9
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