gpt4 book ai didi

nginx - CentOS 上的 PHP 和模块 API 不匹配

转载 作者:行者123 更新时间:2023-12-04 19:38:12 25 4
gpt4 key购买 nike

一段时间以来,我一直在使用 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 来检查这些选项。编译前。

关于nginx - CentOS 上的 PHP 和模块 API 不匹配,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23258271/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com