Fatal error: Call to undefined function pg_connect()

后端 未结 17 1474
广开言路
广开言路 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:35

    You have to follow these steps:

    Open the php configuration file, which is located in the following directory

    C: \ xampp \ php \ php.ini
    

    Within that file search the extension section and uncomment the following lines

    extension = php_pdo_pgsql.dll  
    extension = php_pgsql.dll
    

    and restart your apache

提交回复
热议问题