From: Ilis <ilis.krou@gmail.com> To: "ALT Linux Community general discussions" <community@lists.altlinux.org> Subject: [Comm] undefined function: pg_prepare Date: Thu, 13 Nov 2008 23:46:48 +0500 Message-ID: <91dc8dbf0811131046w2e6ed261yf1cac897d709ef04@mail.gmail.com> (raw) Не могу понять, 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 Куда ещё надо смотреть? -- Кругликов Илья
next reply other threads:[~2008-11-13 18:46 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2008-11-13 18:46 Ilis [this message] 2008-11-13 19:23 ` Ilis 2008-11-13 19:54 ` Yuri Bushmelev
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=91dc8dbf0811131046w2e6ed261yf1cac897d709ef04@mail.gmail.com \ --to=ilis.krou@gmail.com \ --cc=community@lists.altlinux.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
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