pdo is working fine with mysql but with pgsql its giving error \'PDOException\' with message \'could not find driver\'
I\'ve installed php5-pgsql
p
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?
Try to remove semicolon in front of
extension=pgsql
extension=pgsql.so
included in your php.ini file
You can do that from the XAMPP Control Panel.
Here is what I did to solve the problem.
Edit php.ini
and remove ;
from extension=pdo_pgsql
. Also, add extension=pgsql.so
to the php.ini
file.
Make sure to restart the Apache server before you try to see the result.