Problems caused by coexistence of multiple versions of PHP

Source: Internet
Author: User
This has a server, using Nginx plus php-fpm, which contains 2 versions of PHP, 5.3 and 5.5, now that I'm going to install a new redis extension, I downloaded the Redis extension's source package from the official website, compiled and installed, and finally added extension=redis.so last reboot php-fpm in php.ini.

So there was an error, meaning that I compiled a PHP extension using a different version

PHP Warning:  PHP Startup: redis: Unable to initialize moduleModule compiled with module API=20100525PHP    compiled with module API=20121212

Probably found out what the reason is, because php-fpm -v the version used is 5.5, the php -v version shown is 5.3,phpize using is 5.3.

So the compiled so file deleted, re-extract the source package compiled, using 5.5 version of the phpize, found that the restart is the same, and no use of any eggs.

$ /usr/local/php/bin/phpize -vConfiguring for:PHP Api Version:         20121113Zend Module Api No:      20121212Zend Extension Api No:   220121212$ sudo /usr/local/php/bin/phpize$ ./configure --with-php-config=/usr/local/php/bin/php-config$ make$ sudo make install

Excuse me, how can i solve this situation? I could not delete the 5.3 version because it is a server that may be used by someone else.

Reply content:

This has a server, using Nginx plus php-fpm, which contains 2 versions of PHP, 5.3 and 5.5, now that I'm going to install a new redis extension, I downloaded the Redis extension's source package from the official website, compiled and installed, and finally added extension=redis.so last reboot php-fpm in php.ini.

So there was an error, meaning that I compiled a PHP extension using a different version

PHP Warning:  PHP Startup: redis: Unable to initialize moduleModule compiled with module API=20100525PHP    compiled with module API=20121212

Probably found out what the reason is, because php-fpm -v the version used is 5.5, the php -v version shown is 5.3,phpize using is 5.3.

So the compiled so file deleted, re-extract the source package compiled, using 5.5 version of the phpize, found that the restart is the same, and no use of any eggs.

$ /usr/local/php/bin/phpize -vConfiguring for:PHP Api Version:         20121113Zend Module Api No:      20121212Zend Extension Api No:   220121212$ sudo /usr/local/php/bin/phpize$ ./configure --with-php-config=/usr/local/php/bin/php-config$ make$ sudo make install

Excuse me, how can i solve this situation? I could not delete the 5.3 version because it is a server that may be used by someone else.

Php-config Path to

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.