php扩展安装Api Version不匹配问题

来源:互联网 发布:文玩网络交易平台 编辑:程序博客网 时间:2024/05/22 17:50

在安装php扩展的时候遇到一个问题

在重启php-fpm的时候报错

Gracefully shutting down php-fpm . doneStarting php-fpm [16-Jan-2014 12:46:26] NOTICE: PHP message: PHP Warning:  PHP Startup: memcache: Unable to initialize moduleModule compiled with module API=20090626PHP    compiled with module API=20100525These options need to match in Unknown on line 0 done

提示memcache扩展 和php 的api不一致,刚开始我以为是memcache版本的问题,但是扩展已经是最新的问题啊

而且我发现安装其他扩展也会报相同的错误。

最后终于在网上找到原因,最终原因竟然是phpize的问题

原来在安装php的时候phpize也会一起安装,但是由于php的bin目录没有添加到环境变量中,所以第一次使用phpize的shihou提示command not found

我以为phpize没有安装,就用yum重新安装了一边,所以问题来了 我用yum安装的phpize和我用源码安装的php 版本不一致 所以才会一直导致上面的问题

知道原因之后通过f

find / -name phpize

找到旧版本的phpize 删掉 然后把php安装目录的bin加入到环境变量中 http://blog.csdn.net/a657941877/article/details/18356405

最后重新编译安装 问题解决



0 0