Question

I have been using Centmin to help manage my web server for a while now. I just recently started up a dev server to update my current production server. Right now I am having issues trying to get php 5.4.27 and its modules to work. Currently the only two modules that are throwing errors on php-fpm restart are memcache and memcached.

The server is running Nginx and PHP-FPM

Starting php-fpm [24-Apr-2014 11:31:02] NOTICE: PHP message: PHP Warning:  PHP Startup: memcache: Unable to initialize module
Module compiled with module API=20090626
PHP    compiled with module API=20100525
These options need to match
 in Unknown on line 0
[24-Apr-2014 11:31:02] NOTICE: PHP message: PHP Warning:  PHP Startup: memcached: Unable to initialize module
Module compiled with module API=20090626
PHP    compiled with module API=20100525
These options need to match

I have tried pecl upgrade, uninstall and install of the modules. I have as well tried to use yum to install them. What can I do to resolve this issue?

Was it helpful?

Solution

The errors you are receiving is because the module you are attempting to install/upgrade was built using a different version of PHP.

Either install the same version of PHP for which the modules were built with OR simply compile the modules manually which is quite easy to do.

1) Download pecl module and untar
2) cd into module directory and phpize
3) ./configure
4) make && make install

Make sure the modules are install into the proper extensions directory too so the php.ini can load them. Some pecl modules have specific ./configure options too, you can check those by running ./configure --help before compilation.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top