模块冲突 编译php模块的时候一定--with-php-config


错误:

NOTICE: PHP message: PHP Warning: PHP Startup: mcrypt: Unable to initialize module
Module compiled with module API=20090626
PHP compiled with module API=20121212

当服务器中安装了2个以上的php环境时会出现以上错误,这是由于phpize编译的版本不一致

 

所以安装扩展的时候 一定要

/usr/local/php/bin/phpize #写全phpize的路径
./configure --with-php-config=/usr/local/php/bin/php-config  #配置时 要将php-config的路径附上
make && make install

这样就不会出现以上错误了


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM