Site icon 时鹏亮的Blog

Module compiled with module API=20121212 PHP compiled with module API=2013122 解决方案

请知悉:本文最近一次更新为 6年 前,文中内容可能已经过时。

嗯,遇到这种奇葩情况一般都是本机有多个PHP,
编译的驱动在重启php-fpm的时候报错提示:

Module compiled with module API=20121212
PHP compiled with module API=2013122

解决方案如下:
1.locate phpize,以/usr/bin为例。
2.编辑/etc/profile

vim /etc/profile

3.尾部添加:

PATH=$PATH:/usr/bin
export PATH

4.保存退出后执行:

source /etc/profile

5.执行make clean清理之前编译的记录
6.phpize,进行编译等配置,如果这步报错类似

Can't find PHP headers in /usr/include/php/5.6/php
The php-devel package is required for use of this command.

以我这报错为例:

yum install php56-devel -y

7.再进行编译等流程即可。


如您从本文得到了有价值的信息或帮助,请考虑扫描文末二维码捐赠和鼓励。

尊重他人劳动成果。转载请务必附上原文链接,我将感激不尽。


与《Module compiled with module API=20121212 PHP compiled with module API=2013122 解决方案》相关的博文:

Exit mobile version