lnmp0.5 如何让php支持 postgresql数据库?
pgsql是通过yum安装的 版本号为8.4.4我把PHP编译部分改为
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-pgsql=/var/lib/pgsql --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-iconv-dir --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-discard-path --enable-magic-quotes --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fastcgi --enable-fpm --enable-force-cgi-redirect --enable-mbstring --with-mcrypt --enable-ftp --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --without-pear --with-gettext --with-mime-magic --enable-suhosin
重新编译...但是 用探针查看,还是没有支持
求教....
回复 1# 的帖子
已经yum安装了postgresql,在编译参数上加上--with-pgsql ,重新按脚本安装php,重启一下就可以了。 是将 下面的./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-pgsql=/var/lib/pgsql --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-iconv-dir --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-discard-path --enable-magic-quotes --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fastcgi --enable-fpm --enable-force-cgi-redirect --enable-mbstring --with-mcrypt --enable-ftp --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --without-pear --with-gettext --with-mime-magic --enable-suhosin
--with-pgsql=/var/lib/pgsql改为 --with-pgsql 就可以么? 嗯,再重新按脚本安装php,重启一下就可以了。 已编译模块检测
datelibxmlopensslpcrezlibbcmathctypecurldomfilterftpgd
gettexthashiconvjsonmbstringmcryptmhashmime_magicmysqlSimpleXMLpcntlSPL
PDOpdo_sqliteposixReflectionsessionshmopmysqlisoapsocketsSQLitestandardsysvsem
tokenizerxmlxmlreaderxmlrpcxmlwriterzipcgi-fcgimemcachepdo_mysqlZend Optimizer
仍然没有....
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-pgsql --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-iconv-dir --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-discard-path --enable-magic-quotes --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fastcgi --enable-fpm --enable-force-cgi-redirect --enable-mbstring --with-mcrypt --enable-ftp --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --without-pear --with-gettext --with-mime-magic --enable-suhosin
回复 5# 的帖子
编译参数上加上--with-pgsql ,按脚本重新安装php,重启一下就可以了。你肯定没重新安装,只configure了一下 问题找到了,但是不知道怎么解决
configure 时 报错
checking for pg_config... not found
configure: error: Cannot find libpq-fe.h. Please specify correct PostgreSQL installation path 找到解决办法
yum install postgresql-devel postgresql-libs postgresql-contrib
但是 make 时报错
回复 7# 的帖子
--with-pgsql=加上pgsql的路径 make ZEND_EXTRA_LIBS='-liconv' 时报错make: *** Error 1 加上了
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-iconv-dir --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-discard-path --enable-magic-quotes --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fastcgi --enable-fpm --enable-force-cgi-redirect --enable-mbstring --with-mcrypt --enable-ftp --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --without-pear --with-gettext --with-mime-magic --enable-suhosin --with-pgsql=/var/lib/pgsql
页:
[1]