php connection to PostgreSQL database

0

Problem when connecting to PostgreSQL database using PHP. When I run the pg_conect() function, the following error occurs

Fatal error: Call to undefined function pg_connect() 

I have already added the path of the dll from postgreSQL to httpd

LoadFile "C:/Program Files/PostgreSQL/9.4/bin/libpq.dll"

and also enabled php extensions in php.ini by removing ; extension = php_pgsql.dll

Whenever I run the code to check if the extension is active it picks me up error

echo extension_loaded('pgsql') ? 'Ok':'Erro';

Currently I use wampserv with apache2.4.9 and php5.5.12. How can I resolve this error? is it possible to resolve to changing the version, since making these changes I can not? How can I get php access to pgsql? since my application is not able to find it?

    
asked by anonymous 19.08.2017 / 20:59

1 answer

0

The problem was the version of wamp and its tools, I uninstalled the version I was using 2. * and installed the most current version. I performed the procedure again to enable pgsql, removing it; of php.ini, and now it has managed to find the extension and connect to PostgreSQL

    
20.08.2017 / 04:23