我需要在需要访问 postgresql 数据库的 apache tomcat 服务器上执行一个 php 文件。服务器是 Centos Linux。我安装了 apache tomcat 7 、 php 、 postgresql 和 php-potgresql 。
$ cat /etc/php.d/pgsql.ini [gives the following]
; Enable pgsql extension module
extension=pgsql.so
但是在浏览器上加载所需的页面时,我收到以下错误:
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.
任何有关如何解决此问题的指示将不胜感激。