2

I'm setting up an alt-install for PHP7 on CentOS 6.7 with the configure options that were used for the original PHP version:

./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

It's throwing the following error though:

configure: WARNING: unrecognized options: --with-mysql

Is anyone aware of what the correct option is for PHP7, I can't seem to find it on Google? Thanks :)

2 Answers 2

6

--with-mysql option is no longer supported in PHP7. You need to use mysqli extension for this.

I have not tested this but mysqli extension will be installed by default when you execute ./configure and not enabled by default so you need to enable it after installation.

1
  • Ah perfect, thank you for the explanation. I'll get back and upvote you once I get enough rep on the community.
    – Neekoy
    Mar 9, 2016 at 12:31
2

Change parameter

--with-mysql for this value --with-mysqli

1
  • --with-mysqli=mysqlnd
    – learner
    Jul 28, 2019 at 18:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .