Steve Mathias wrote:

The following code:

// Connect to a database named "mary"
$dbconn = pg_connect("host=localhost port=5432 dbname=test user=test
password=test"); if(!$dbconn) {
    echo "Unable to connect to test database\n";
    echo pg_last_errror($dbconn);
$result = pg_prepare($dbconn, "my_query", 'SELECT * FROM users WHERE
username = $1');

gives me this in the apache log:

[Tue Oct 31 15:11:42 2006] [error] [client] PHP Fatal error:  Call 
to undefined function pg_prepare() in /usr/local/apache/htdocs/php/dbtest.php 
on line 10

Other than this, PHP and non-prepare related pg_* functions work
fine.  php_info() reports that it sees version 8.0.3 of libpq.  I've
done a fresh compile and install of apache and PHP.  Versions are:

Well there is no php 5.6.1 ;) there is a 5.1.6 though and it should work there.

What shows up if you do a simple:


Postgresql & php tutorials

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to