Undefined pg_prepare() in 5.6.1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

The following code:

<?php
// 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);
    exit;
}
$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 xx.xxx.xxx.x] 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:
Apache: 2.2.3
PHP: 5.6.1
Postgres: 8.0.3
My configure line for PHP was: ./configure
--with-apxs2=/usr/local/apache/bin/apxs --with-pgsql=/usr/local/pgsql
--with-mysql=/usr/local/mysql --enable-force-cgi-redirect --disable-cgi
--with-zlib --with-gettext

I've not been able to find any help on this in the FAQ or by
searching the archives.  It seems like this must be something really
stupid, but I'm stumped.  Any help/pointers would be greatly appreciated.

-Steve
-- 
(   Stephen L. Mathias, Ph.D.  (   s m a t h i a s  (
 )  Division of Biocomputing    )  @ p o b l a n o   )
(   UNM School of Medicine     (   . h e a l t h .  (
 )                              )  u n m . e d u     )
(         http://poblano.health.unm.edu/            (

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux