Apache是​​"无法初始化模块"由于模块和PHP的API改变PHP配置后不匹配 [英] Apache is "Unable to initialize module" because of module's and PHP's API don't match after changing the PHP configuration

查看:421
本文介绍了Apache是​​"无法初始化模块"由于模块和PHP的API改变PHP配置后不匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

PHP -v给出了这样的

php -v gives this

PHP Warning:  PHP Startup: memcache: Unable to initialize module
Module compiled with module API=20060613
PHP    compiled with module API=20090626
These options need to match in Unknown on line 0
PHP Warning:  PHP Startup: memcache: Unable to initialize module
Module compiled with module API=20060613
PHP    compiled with module API=20090626
These options need to match in Unknown on line 0
bogus test name tests/

PS。我从PHP 5.2升级到5.3。在此之前一切都还行。

ps. i've upgraded from php 5.2 to 5.3. before this everything worked okay.

推荐答案

在更新PHP的的版本(尤其是从版本XY去版本XZ时)您必须更新PHP扩展以及

结果
这是因为PHP扩展用C developped,并且是接近PHP的内部 - 这意味着,如果这些内部变化的API,扩展名必须重新编译,使用新版本


This is because PHP extensions are developped in C, and are "close" to the internals of PHP -- which means that, if the APIs of those internals change, the extension must be re-compiled, to use the new versions.

和,PHP 5.2和PHP 5.3之间,因为我记得,曾有由PHP引擎使用的内部数据结构进行一些修改 - 这意味着扩展必须重新编译,才能匹配新版本的数据结构。

And, between PHP 5.2 and PHP 5.3, for what I remember, there have been some modifications in the internal data-structures used by the PHP engine -- which means extensions must be re-compiled, in order to match that new version of those data-structures.

结果
如何更新你的PHP扩展将取决于你所使用的系统。


How to update your PHP extensions will depend on which system you are using.

如果您在Windows上,你可以找到的.dll 对于一些扩展此处的 http://downloads.php.net/pierre/
结果有关不同版本的更多信息,你可以看看什么在 windows.php左边的侧边栏表示, .NET

If you are on windows, you can find the .dll for some extensions here : http://downloads.php.net/pierre/
For more informations about the different versions, you can take a look at what's said on the left-sidebar of windows.php.net.

如果你是在Linux上,您必须:

If you are on Linux, you must either :


  • 检查你的发行版提供了什么

  • PECL 命令,重新下载有问题的扩展的来源,并重新编译它们。

  • Check what your distribution provides
  • Or use the pecl command, to re-download the sources of the extensions in question, and re-compile them.

这篇关于Apache是​​"无法初始化模块"由于模块和PHP的API改变PHP配置后不匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆