There is a server that uses nginx and php-fpm, which contains two versions of PHP, 5.3 and 5.5. now, because I want to install the new redis extension, so I downloaded the redis extension source code package from the official website, compiled and installed it, and finally in php. extensionredis is added to ini. so finally restart php-fp... there is a server that uses nginx and php-fpm, which contains two versions of PHP, 5.3 and 5.5. now, because I want to install the new redis extension, so I downloaded the redis extension source code package from the official website, compiled and installed it, and finally in php. add extension = redis to ini. so finally restart php-fpm.
So an error is reported, which means that the php extensions I compiled use different versions.
PHP Warning: PHP Startup: redis: Unable to initialize moduleModule compiled with module API=20100525PHP compiled with module API=20121212
Probably found out why, because of the usephp-fpm -v
The version is 5.5,php -v
The displayed version is 5.3, and phpize uses 5.3.
So I deleted the compiled so file, decompressed the source code package again, and used phpize of version 5.5. I found that it was the same when I restarted it, and it was useless.
$ /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
How can I solve this problem? It is impossible for me to delete version 5.3 because someone else may have used it on the server.
Reply content:
There is a server that uses nginx and php-fpm, which contains two versions of PHP, 5.3 and 5.5. now, because I want to install the new redis extension, so I downloaded the redis extension source code package from the official website, compiled and installed it, and finally in php. add extension = redis to ini. so finally restart php-fpm.
So an error is reported, which means that the php extensions I compiled use different versions.
PHP Warning: PHP Startup: redis: Unable to initialize moduleModule compiled with module API=20100525PHP compiled with module API=20121212
Probably found out why, because of the usephp-fpm -v
The version is 5.5,php -v
The displayed version is 5.3, and phpize uses 5.3.
So I deleted the compiled so file, decompressed the source code package again, and used phpize of version 5.5. I found that it was the same when I restarted it, and it was useless.
$ /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
How can I solve this problem? It is impossible for me to delete version 5.3 because someone else may have used it on the server.
PHP-config