原centos系统自带的php版本是 5.1.6,使用yum安装了下php,但观察Configure Command 这行显示的是:'./configure' '--build=i686-redhat-linux-gnu' '--host=i686-redhat-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' '--cache-file=../config.cache'
'--with-libdir=lib' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug'
'--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-exec-dir=/usr/bin'
'--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-xpm-dir=/usr'
'--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv'
'--with-jpeg-dir=/usr' '--with-openssl' '--with-pcre-regex=/usr' '--with-zlib'
'--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes'
'--enable-sockets' '--enable-sysvsem' '--enable-sysvshm'
'--enable-sysvmsg' '--with-kerberos' '--enable-ucd-snmp-hack'
'--enable-shmop' '--enable-calendar' '--without-mime-magic'
'--without-sqlite' '--with-libxml-dir=/usr' '--enable-xml'
'--with-system-tzdata' '--with-apxs2=/usr/sbin/apxs' '<SPAN style="COLOR: #e53333">--without-mysql</SPAN>'
'--without-gd' '--disable-dom' '--disable-dba'
'--without-unixODBC' '--disable-pdo' '--disable-xmlreader'
'--disable-xmlwriter' '<SPAN style="COLOR: #e53333">--disable-json</SPAN>' '--without-pspell'
'--disable-wddx' '--without-curl' '--disable-posix'
'--disable-sysvmsg' '--disable-sysvshm' '--disable-sysvsem' --without-mysql--disable-json
如上,mysql和json全被禁用了,请问该如何修改这个选项能正常使用json、mysql,谢谢各位!
'--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' '--cache-file=../config.cache'
'--with-libdir=lib' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug'
'--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-exec-dir=/usr/bin'
'--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-xpm-dir=/usr'
'--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv'
'--with-jpeg-dir=/usr' '--with-openssl' '--with-pcre-regex=/usr' '--with-zlib'
'--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes'
'--enable-sockets' '--enable-sysvsem' '--enable-sysvshm'
'--enable-sysvmsg' '--with-kerberos' '--enable-ucd-snmp-hack'
'--enable-shmop' '--enable-calendar' '--without-mime-magic'
'--without-sqlite' '--with-libxml-dir=/usr' '--enable-xml'
'--with-system-tzdata' '--with-apxs2=/usr/sbin/apxs' '<SPAN style="COLOR: #e53333">--without-mysql</SPAN>'
'--without-gd' '--disable-dom' '--disable-dba'
'--without-unixODBC' '--disable-pdo' '--disable-xmlreader'
'--disable-xmlwriter' '<SPAN style="COLOR: #e53333">--disable-json</SPAN>' '--without-pspell'
'--disable-wddx' '--without-curl' '--disable-posix'
'--disable-sysvmsg' '--disable-sysvshm' '--disable-sysvsem' --without-mysql--disable-json
如上,mysql和json全被禁用了,请问该如何修改这个选项能正常使用json、mysql,谢谢各位!
例如json
http://www.aurore.net/projects/php-json/php-json-ext-1.2.1.tar.bz2
然后解压然后
#phpize
#./configure (详细部分查看 README 啥的)
#make
#make install自己编译 编译好了 往php.ini添加
extension=xxx.so重启apache...
用的这个语句
rpm --import http://repo.webtatic.com/yum/RPM-GPG-KEY-webtatic-andywget -P /etc/yum.repos.d/ http://repo.webtatic.com/yum/webtatic.repoyum --enablerepo=webtatic --exclude=php*5.3* list phpyum --enablerepo=webtatic --exclude=php*5.3* update -y php
可怜的孩子,我以前也一样,碰到问题了 赶紧装系统,呵呵,其实也好 装多两次提高经验,无奈Linux这东西的确是复杂了点。