开发者

Unable to connect to Postgresql DB with PHP

开发者 https://www.devze.com 2023-02-16 00:43 出处:网络
I am trying to connect to Postgre using a PHP script, but it returns the following error: Fat开发者_运维问答al error: Call to undefined function pg_connect() in C:\\wamp\\www\\contact.php on line 2

I am trying to connect to Postgre using a PHP script, but it returns the following error:

Fat开发者_运维问答al error: Call to undefined function pg_connect() in C:\wamp\www\contact.php on line 2

What am I doing wrong?


you need to uncomment this line in php.ini:

 extension=php_pgsql.dll


Be sure to have the postgres driver installed into PHP. Find it in your php directory, is named php_pgsql.dll and if you have it, check if found in the php ini:

;extension=php_pgsql.dll

and uncomment it:

extension=php_pgsql.dll
0

精彩评论

暂无评论...
验证码 换一张
取 消