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

后端 未结 9 1891
悲&欢浪女
悲&欢浪女 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:01

    This message means you need to install and or activate postgresql extension in PHP

    This solution works for me : To install postgresql extension

    [sudo] apt-get install php-pgsql
    

    after, for activating it, uncomment pgsql and pdo-pgsql extensions in etc/php/$PHP_VERSION/apache2/php.ini file

    Finally, type :

    [sudo] /etc/init.d/apache2 restart
    

    To restart apache server if you use apache such as was my case...

提交回复
热议问题