There is a server here that uses nginx plus php-fpm. It has two versions of PHP installed, 5.3 and 5.5. Now because I want to install a new redis extension, I downloaded the source code package of the redis extension from the official website, compiled and installed it. Finally, add extension=redis.so to php.ini and finally restart php-fpm.
So an error occurred, which means that the version of the php extension I compiled is different
<code>PHP Warning: PHP Startup: redis: Unable to initialize module Module compiled with module API=20100525 PHP compiled with module API=20121212</code>
I probably discovered the reason, because the version using php-fpm -v
is 5.5, the version displayed by php -v
is 5.3, and phpize uses 5.3.
So I deleted the compiled so file, re-decompressed the source code package to compile, and used version 5.5 of phpize. I found that it was still the same when I restarted, and it was of no use.
<code>$ /usr/local/php/bin/phpize -v Configuring for: PHP Api Version: 20121113 Zend Module Api No: 20121212 Zend Extension Api No: 220121212 $ sudo /usr/local/php/bin/phpize $ ./configure --with-php-config=/usr/local/php/bin/php-config $ make $ sudo make install</code>
How should I solve this situation? It is impossible for me to delete version 5.3, because it is on the server and may be used by others.
There is a server here that uses nginx plus php-fpm. It has two versions of PHP installed, 5.3 and 5.5. Now because I want to install a new redis extension, I downloaded the source code package of the redis extension from the official website, compiled and installed it. Finally, add extension=redis.so to php.ini and finally restart php-fpm.
So an error occurred, which means that the version of the php extension I compiled is different
<code>PHP Warning: PHP Startup: redis: Unable to initialize module Module compiled with module API=20100525 PHP compiled with module API=20121212</code>
I probably discovered the reason, because the version using php-fpm -v
is 5.5, the version displayed by php -v
is 5.3, and phpize uses 5.3.
So I deleted the compiled so file, re-decompressed the source code package to compile, and used version 5.5 of phpize. I found that it was still the same when I restarted, and it was of no use.
<code>$ /usr/local/php/bin/phpize -v Configuring for: PHP Api Version: 20121113 Zend Module Api No: 20121212 Zend Extension Api No: 220121212 $ sudo /usr/local/php/bin/phpize $ ./configure --with-php-config=/usr/local/php/bin/php-config $ make $ sudo make install</code>
How should I solve this situation? It is impossible for me to delete version 5.3, because it is on the server and may be used by others.
PHP-config path is correct