[PHP-users 14679]コマンドラインからpg_connect出来ない

fumio kitatani sanfre11 @ free.japandesign.ne.jp
2003年 4月 16日 (水) 17:48:12 JST


みなさん、はじめまして。
フミオと申します。
以後、よろしくお願いいたします。

さて現在以下のような環境で、開発を進めてます。

redhat 8.0
apache 2.0.40
PHP 4.2.2
postgreSQL 7.2.3
(全てRPMパッケージでのインストールです。)


ブラウザからだと、pg_connectはできるのですが、
コマンドからPHPファイル実行させると、
pgsql関数のところでundefined functionになってしまいます。
(mail関数など他の関数は大丈夫です)

例えば。。。

コマンドからhoge.phpを実行
#php -f hoge.php

hoge.phpの中身
======================
#!/usr/bin/php -q
<?
$conn = pg_connect("","","hoge");
?>
======================

結果。。。
Fatal error: Call to undefined function: pg_connect() in /var/www/html/home.php on line 2


CGI版をいれてみてコマンドからやってみましたが、
やはりだめでした。

もし何かわかる方がいらっしゃれば、
ぜひご教授よろしくお願いいたします。



phpinfoのconfig部分を抜粋します。
======================================================================
'./configure' '--host=i686-pc-linux-gnu' '--build=i686-pc-linux-gnu' '--target=i386-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--prefix=/usr' '--cache-file=../config.cache' '--with-config-file-path=/etc' '--enable-force-cgi-redirect' '--disable-debug' '--enable-pic' '--disable-rpath' '--enable-inline-optimization' '--with-bz2' '--with-db3' '--with-curl' '--with-dom=/usr' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-gd' '--enable-gd-native-ttf' '--with-ttf' '--with-gdbm' '--with-gettext' '--with-ncurses' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-pspell' '--with-regex=system' '--with-xml' '--with-ex!
 pat-dir=/usr' '--with-zlib' '--with-layout=GNU' '--enable-bcmath' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-safe-mode' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-discard-path' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--without-oci8' '--with-pear=/usr/share/pear' '--with-imap=shared' '--with-imap-ssl' '--with-kerberos=/usr/kerberos' '--enable-mbregex' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-cli' '--with-ldap=shared' '--with-mysql=shared,/usr' '--with-pgsql=shared' '--with-snmp=shared,/usr' '--with-snmp=shared' '--enable-ucd-snmp-hack' '--with-unixODBC=shared' '--enable-memory-limit' '--enable-bcmath' '--enable-shmop' '--enable-versioning' '--enable-calendar' '--enable-dbx' '--enable-dio' '--enable-mcal' '--with-apxs2=/usr/sbin/apxs'



PHP-users メーリングリストの案内