The following error occurs when php installs the mysql extension:
NOTICE: PHP message: PHP Warning: PHP Startup: mysql: Unable to initialize module Module compiled with module API=20121212 PHP compiled with module API=20131226 These options need to match in Unknown on line 0
The reason is that the versions of phpize and php modules are inconsistent. The reason here is because there are two different versions of phpize on the server. First, search for phpize on the server. See See if it is the same problem
locate phpsize or find / -name phpize
I found it in the /usr/local/bin directory
-rwxr-xr-x 1 root root 27264823 Sep 16 2013 php
-rwxr-xr -x 1 root root 27173725 Sep 16 2013 php-cgi
-rwxr-xr-x 1 root root 2222 Sep 16 2013 php-config
-rwxr-xr-x 1 root root 4533 Sep 16 2013 phpize
Re Establish soft link Point to new
lrwxrwxrwx 1 root root 22 Aug 10 08:07 php -> /usr/local/php/bin/php
lrwxrwxrwx 1 root root 26 Aug 10 08:07 php-cgi -> /usr/local /php/bin/php-cgi
lrwxrwxrwx 1 root root 29 Aug 10 08:06 php-config -> /usr/local/php/bin/php-config
lrwxrwxrwx 1 root root 25 Aug 10 08:06 phpize - > /usr/local/php/bin/phpize
Then continue by installing the extension and the problem is solved
Copyright statement: This article is an original article by the blogger and may not be reproduced without the permission of the blogger.
The above introduces the solution to the MySQL extension installed by PHP and the version inconsistency, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.