Compiling PHP7 on server with (old) MySQL 5.6

If you ever need to compile PHP7.0+ on a server where you still are running old MySQL and configuration script complains about not being able to find MySQL or that MySQL 4.1 is required for that, stop breaking your head against the wall! Here comes the tip for you guys.

Possible errors that you might be getting

configure: error: wrong mysql library version or lib not found. Check config.log for more information.

or may be this one

configure: error: PDO_MYSQL configure failed, MySQL 4.1 needed. Please check config.log for more information.

Do not smash you head and do not pull out your hair. Change or set the following settings for your configure script:

--enable-mysqlnd 
--with-pdo-mysql=mysqlnd

It worked for me – I was able to configure and build PHP7. 😉

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *