查看编译PHP时的参数

By | 2015年2月17日

有时候我们需要对php重新编译,比如需要增加某些模块,这时候我们都可能需要当初编译时的参数,对其进行修改,然后再次编译。

我们可以通过如下方法查看php的编译参数:

[root@renyiwei /]# /usr/local/php/bin/php -i |grep configure
Configure Command => './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-mysql-sock=/tmp/mysql.sock'
'--with-pdo-mysql=/usr/local/mysql'
'--with-gd=/usr/local/gd'
'--with-png-dir=/usr/lib'
'--with-jpeg-dir=/usr/lib'
'--with-freetype-dir=/usr/lib'
'--with-iconv'
'--with-zlib'
'--enable-xml'
'--enable-magic-quotes'
'--enable-safe-mode'
'--enable-bcmath'
'--enable-shmop'
'--enable-sysvsem'
'--enable-inline-optimization'
'--with-curlwrappers'
'--enable-mbregex'
'--enable-fpm'
'--enable-mbstring'
'--enable-ftp'
'--enable-gd-native-ttf'
'--with-openssl'
'--enable-pcntl'
'--enable-sockets'
'--with-xmlrpc'
'--enable-zip'
'--enable-soap'
'--without-pear'
'--with-gettext'
'--enable-session'
'--with-mcrypt'
'--with-curl'
'--enable-ctype'