我正在使用用于原始 PHP 版本的配置选项在 CentOS 6.7 上为 PHP7 设置 alt 安装:
./configure --disable-fileinfo --disable-opcache --disable-posix --enable-bcmath --enable-calendar --enable-exif --enable-ftp --enable-gd-native-ttf --enable-libxml --enable-mbstring --enable-pdo=shared --enable-soap --enable-sockets --enable-zip --prefix=/usr/local/php7 --with-bz2 --with-curl=/opt/curlssl/ --with-freetype-dir=/usr --with-gd --with-gettext --with-imap=/opt/php_with_imap_client/ --with-imap-ssl=/usr --with-jpeg-dir=/usr --with-kerberos --with-libdir=lib64 --with-libxml-dir=/opt/xml2 --with-libxml-dir=/opt/xml2/ --with-mcrypt=/opt/libmcrypt/ --with-mysql=/usr --with-mysql-sock=/var/lib/mysql/mysql.sock --with-mysqli=/usr/bin/mysql_config --with-openssl=/usr --with-openssl-dir=/usr --with-pcre-regex=/opt/pcre --with-pdo-mysql=shared --with-pdo-sqlite=shared --with-pic --with-png-dir=/usr --with-tidy=/opt/tidy/ --with-xpm-dir=/usr --with-zlib --with-zlib-dir=/usr
Run Code Online (Sandbox Code Playgroud)
虽然它抛出以下错误:
configure: WARNING: unrecognized options: --with-mysql
Run Code Online (Sandbox Code Playgroud)
有没有人知道 PHP7 的正确选项是什么,我似乎无法在 Google 上找到它?谢谢 :)
PHP7 不再支持 --with-mysql 选项。您需要为此使用 mysqli 扩展。
我没有测试过这个,但是当你执行 ./configure 时会默认安装 mysqli 扩展,并且默认情况下没有启用,所以你需要在安装后启用它。
归档时间: |
|
查看次数: |
6678 次 |
最近记录: |