VPS侦探论坛
标题:
lnmp0.5 如何让php支持 postgresql数据库?
[打印本页]
作者:
vanvvdot
时间:
2010-12-17 14:58
标题:
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
重新编译...但是 用探针查看,还是没有支持
求教....
作者:
licess
时间:
2010-12-17 15:03
标题:
回复 1# 的帖子
已经yum安装了postgresql,在编译参数上加上--with-pgsql ,重新按脚本安装php,重启一下就可以了。
作者:
vanvvdot
时间:
2010-12-17 16:41
是将 下面的
./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 就可以么?
作者:
licess
时间:
2010-12-17 17:06
嗯,再重新按脚本安装php,重启一下就可以了。
作者:
vanvvdot
时间:
2010-12-17 17:08
已编译模块检测
date libxml openssl pcre zlib bcmath ctype curl dom filter ftp gd
gettext hash iconv json mbstring mcrypt mhash mime_magic mysql SimpleXML pcntl SPL
PDO pdo_sqlite posix Reflection session shmop mysqli soap sockets SQLite standard sysvsem
tokenizer xml xmlreader xmlrpc xmlwriter zip cgi-fcgi memcache pdo_mysql Zend 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
作者:
licess
时间:
2010-12-17 20:09
标题:
回复 5# 的帖子
编译参数上加上--with-pgsql ,按脚本重新安装php,重启一下就可以了。
你肯定没重新安装,只configure了一下
作者:
vanvvdot
时间:
2010-12-20 10:00
问题找到了,但是不知道怎么解决
configure 时 报错
checking for pg_config... not found
configure: error: Cannot find libpq-fe.h. Please specify correct PostgreSQL installation path
作者:
vanvvdot
时间:
2010-12-20 10:10
找到解决办法
yum install postgresql-devel postgresql-libs postgresql-contrib
但是 make 时报错
作者:
licess
时间:
2010-12-20 10:11
标题:
回复 7# 的帖子
--with-pgsql=加上pgsql的路径
作者:
vanvvdot
时间:
2010-12-20 10:13
make ZEND_EXTRA_LIBS='-liconv' 时报错
make: *** [sapi/cgi/fastcgi.lo] Error 1
作者:
vanvvdot
时间:
2010-12-20 10:15
加上了
./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
欢迎光临 VPS侦探论坛 (https://bbs.lnmp.com/)
Powered by Discuz! X3.4