解决无法加载控件:PHP Startup: taint: Unable to initialize module

为Centos服务器,安装PHP的yaf2.3.5拓展时,发现出现这样的提示:

PHP Warning: PHP Startup: taint: Unable to initialize module
Module compiled with module API=20090626
PHP compiled with module API=20131226
These options need to match

解释一下,我的PHP版本是5.6,编译yaf2.3.5的时候也是在PHP5.6环境下进行的。可编译结果就是不匹配,这问题是怎么来的呢?

再查,zend_modules.h,发现问题了。

这个文件在/usr/include/php/Zend 这个目录下

有一行:
#define ZEND_MODULE_API_NO 20090626

尽管编译的时候,定义了/usr/local/php56/bin/phpize,即20131226,但实际执行的依然是20090626

-----------

解决方式很简单,修改ZEND_MODULE_API_NO为20131226,然后回去重新编译

千万记得make以前,先执行make clean

-----------

 由于php.ini已经添加了yaf.so拓展,所以不需要再次修改php.ini,直接看phpinfo(),有yaf了,问题成功解决。

 

posted @ 2017-11-20 16:17  延吉宝  阅读(969)  评论(0编辑  收藏  举报
粤ICP备13013300号