Sorry if this was already mentioned on the list, but I couldn't find it.
One of our developpers wants to use the pg_transaction_status() command
on one of our servers.
This sample code (as taken from de documentation):
$dbconn = pg_connect("dbname=xxxxx host=xxx.xxx.xxx.xxx user=xxxx
password=xxxxxxx") or die("Could not connect");
$stat = pg_transaction_status($dbconn);
if ($stat === PGSQL_TRANSACTION_UNKNOWN) {
echo 'Connection is bad';
} else if ($stat === PGSQL_TRANSACTION_IDLE) {
echo 'Connection is currently idle';
} else {
echo 'Connection is in a transaction state';
}
produces the following error:
Fatal error: Call to undefined function pg_transaction_status() in
test.php on line 14
The php manual states the following:
Not all functions are supported by all builds. It depends on your
libpq (The PostgreSQL C Client interface) version and how libpq is
compiled. If there is missing function, libpq does not support the
feature required for the function.
I have installed Postgresql 8.0.0 from source and php 5.0.4 also from
source.
so my question is: how does postgresql 8.0.x need to be
compiled/installed for the pg_transaction_status() command to work?
Thanks for any ideas you might have.
Kind regard,
Jo.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php