PHP with PGSQL on Apache Tomcat 7

700 Views Asked by At

I need to execute a php file on apache tomcat server that needs to access postgresql database. The server is Centos Linux. I have apache tomcat 7 , php , postgresql and php-potgresql installed.

$ cat /etc/php.d/pgsql.ini  [gives the following]
; Enable pgsql extension module
extension=pgsql.so

However on loading the required page on a browser, i get the fowllowing error:

 HTTP Status 500 - java.lang.RuntimeException: PHP Fatal error: Call to undefined function pg_connect() in /home/criminfo/apache-tomcat-7.0.41/webapps/JavaBridgeTemplate621/hybrid.php on line 4

type Exception report

message java.lang.RuntimeException: PHP Fatal error: Call to undefined function pg_connect() in /home/criminfo/apache-tomcat-7.0.41/webapps/JavaBridgeTemplate621/hybrid.php on line 4

description The server encountered an internal error that prevented it from fulfilling this request.

Any directions on how to fix this will be appreciated.

0

There are 0 best solutions below