PostgreSQL access not working in PHP.

Neil Dugan fedora at butterflystitches.com.au
Wed Mar 23 00:12:28 UTC 2005


I am trying to use PostgreSQL in php under Fedora 3.

I am using the standard RPM (retrieved by up2date).
PHP 4.3.10 (cgi) (built: Dec 21 2004 09:18:25)

The php function 
function_exists('pg_connect')
always returns FALSE


The script below
----------------
#! /usr/bin/php
<?php
$dbconn = pg_connect ("dbname=mydb");
if (!$dbconn) {
	echo "Failed to connect!\n";
	exit;
}
?>
----------------
Gives the output of
----------------
PHP Fatal error:  Call to undefined function:  pg_connect()
in /tmp/test.php on line 3
Content-type: text/html
X-Powered-By: PHP/4.3.10
----------------


phpinfo() says that the 'configure command'
includes '--with-pgsql=shared'







More information about the fedora-list mailing list