[Comm] undefined function: pg_prepare
Ilis
=?iso-8859-1?q?ilis=2Ekrou_=CE=C1_gmail=2Ecom?=
Чт Ноя 13 21:46:48 MSK 2008
Не могу понять, pg_connect отрабатывает, а
pg_prepare/pg_execute/pg_version undefined
[ilis на altus ~]$ rpm -qa | grep php
php-4.4.8-alt1
apache-mod_php-4.4.8-alt1.1
php-base-2.2-alt1
php-suhosin-0.9.22-alt1
php-pgsql-4.4.8-alt1
php-libs-4.4.8-alt1
В index.php:
print phpinfo(INFO_MODULES);
print "before connect<p />\n";
$pg_conn_string = "dbname=ha user=user password=pass";
$pg_conn = pg_connect($pg_conn_string);
if (!$pg_conn) {
print "Ошибка подключения!";
die;
}
print "after pg connect<p />\n";
var_dump($pg_conn);
print "after connect<p />\n";
//$stmt = OCIParse($conn, "alter session set
NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS'");
//OCIExecute($stmt,OCI_DEFAULT);
//$v = pg_version($pg_conn);
//var_dump($v);
$sqlsel="select now() as datum from dual"."\n";
$pg_result = pg_prepare($pg_conn, "datum", $sqlsel);
$pg_result = pg_execute($pg_conn, "datum");
Результат:
PostgreSQL Support enabled
PostgreSQL(libpq) Version 8.2.5
before connect
after pg connect
resource(2) of type (pgsql link)
after connect
Fatal error: Call to undefined function: pg_prepare() in
/var/www/.../index.php on line 41
Куда ещё надо смотреть?
--
Кругликов Илья
Подробная информация о списке рассылки community