* [Comm] undefined function: pg_prepare
@ 2008-11-13 18:46 Ilis
2008-11-13 19:23 ` Ilis
0 siblings, 1 reply; 3+ messages in thread
From: Ilis @ 2008-11-13 18:46 UTC (permalink / raw)
To: ALT Linux Community general discussions
Не могу понять, 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
Куда ещё надо смотреть?
--
Кругликов Илья
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Comm] undefined function: pg_prepare
2008-11-13 18:46 [Comm] undefined function: pg_prepare Ilis
@ 2008-11-13 19:23 ` Ilis
2008-11-13 19:54 ` Yuri Bushmelev
0 siblings, 1 reply; 3+ messages in thread
From: Ilis @ 2008-11-13 19:23 UTC (permalink / raw)
To: ALT Linux Community general discussions
13 ноября 2008 г. 23:46 пользователь Ilis написал:
> Не могу понять, 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
>
>
> Fatal error: Call to undefined function: pg_prepare() in
> /var/www/.../index.php on line 41
>
> Куда ещё надо смотреть?
>
Посмотрел в
get_extension_funcs("pgsql")
Array
(
[0] => pg_connect
[1] => pg_pconnect
[2] => pg_close
...
[64] => pg_insert
[65] => pg_update
[66] => pg_delete
[67] => pg_select
[68] => pg_exec
...
)
Вместо pg_execute -- pg_exec, pg_prepare вообще нет, как и функций с
bind-параметрами...
Это мне теперь надо php5 ставить, чтоб было по-современному?
--
Кругликов Илья
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Comm] undefined function: pg_prepare
2008-11-13 19:23 ` Ilis
@ 2008-11-13 19:54 ` Yuri Bushmelev
0 siblings, 0 replies; 3+ messages in thread
From: Yuri Bushmelev @ 2008-11-13 19:54 UTC (permalink / raw)
To: ALT Linux Community general discussions
В сообщении от Четверг 13 ноября 2008 Ilis написал(a):
> 13 ноября 2008 г. 23:46 пользователь Ilis написал:
> Вместо pg_execute -- pg_exec, pg_prepare вообще нет, как и функций с
> bind-параметрами...
>
> Это мне теперь надо php5 ставить, чтоб было по-современному?
В документации на эти функции - PHP 5 >= 5.1.0RC1
--
С уважением,
Бушмелев Юрий
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-11-13 19:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-13 18:46 [Comm] undefined function: pg_prepare Ilis
2008-11-13 19:23 ` Ilis
2008-11-13 19:54 ` Yuri Bushmelev
ALT Linux Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git