Unable to connect to Postgresql DB with PHP
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
精彩评论