Hi Guys, I can't fix this problem. I have installed "php-5.2.10-win32-installer.msi" and "apache_2.2.11-win32-x86-no_ssl.msi", and "mysql-4.1.22-win32" on my XP. When I try to use phpinfo print out database support, I can see mysql is there, but not pgsql. I checked my php.ini, there are entries like these:
[PHP_MYSQL]
extension=php_mysql.dll
[PHP_PGSQL]
extension=php_pgsql.dll
I was wondering why MySQL is ok, but why not postgreSQL?
Following are my php script.
error_reporting(E_ALL | E_STRICT);
echo "connecting...<br>";
echo 'php.ini: ', get_cfg_var('cfg_file_path')," <br/> ";
echo extension_loaded('pgsql') ? 'yes':'no'," <br/> ";
$pg = pg_connect("host=localhost user=postgres
password=xx dbname=xx")
or die("Can't connect to database.");
echo "connected<br>";
?>
result is:
connecting... php.ini: C:\Program Files\PHP\php.ini no
Fatal error: Call to undefined function pg_connect() in E:\WebSite\index.php on line 19
I checked my php.ini, it has above "dll" entries I mentioned, please help.