PostgreSql 'PDOException' with message 'could not find driver'

后端 未结 9 1836
悲&欢浪女
悲&欢浪女 2020-12-09 15:30

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

相关标签:
9条回答
  • 2020-12-09 16:05

    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?

    0 讨论(0)
  • 2020-12-09 16:06

    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.

    0 讨论(0)
  • 2020-12-09 16:14

    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.

    0 讨论(0)
提交回复
热议问题