普通な感じにインストールしたphpからpostgresqlに接続しようと思って、pearのDBとかpg_connectとか使おうとすると
Fatal error: Call to undefined function: pg_connect()
とか
extension not found
とか言われたので色々調べたら、phpからpostgresに接続するにはconfigureで明示的に指定しないと出来ないらしい。
めんどくさいな。その辺でRubyの方が勝ってると思う。ログとしてconfigureオプションをphpinfoからペースト。--with-pgsql=[postgresqlがインストールされたrootディレクトリ]を指定する。
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-zlib-dir=/opt/local/lib --enable-mbregex --enable-mbstring --enable-xml --with-pgsql=/usr/local/pgsql-8.1.8 --with-curl=/opt/local