繁体   English   中英

CentOS上的PHP和模块API不匹配

[英]PHP and Modules API Mismatch on CentOS

一段时间以来,我一直在使用Centmin帮助管理Web服务器。 我刚刚启动了开发服务器来更新当前的生产服务器。 现在,我在尝试使php 5.4.27及其模块正常工作时遇到问题。 当前,在php-fpm重新启动时引发错误的仅有的两个模块是memcache和memcached。

服务器正在运行Nginx和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

我曾尝试pecl升级,卸载和安装模块。 我也尝试使用yum安装它们。 我该怎么做才能解决这个问题?

您收到的错误是因为您尝试安装/升级的模块是使用其他版本的PHP构建的。

要么安装与使用其构建模块的PHP相同的版本,要么简单地手动编译模块,这很容易做到。

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

确保模块也安装在正确的扩展目录中,以便php.ini可以加载它们。 某些pecl模块也具有特定的./configure选项,您可以在编译前通过运行./configure --help进行检查。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM