Fatal error: Call to undefined function pg_connect()

后端 未结 17 1438
广开言路
广开言路 2020-12-02 23:07

I am trying to connect to my database (remote server) which has PostgreSQL installed in it. My PHP code is trying to connect to the database using pg_connect(), but I get th

17条回答
  •  死守一世寂寞
    2020-12-02 23:42

    Easy install for ubuntu:

    Just run:

    sudo apt-get install php5-pgsql
    

    then

    sudo service apache2 restart //restart apache
    

    or

    Uncomment the following in php.ini by removing the ;

    ;extension=php_pgsql.dll
    

    then restart apache

提交回复
热议问题