模塊沖突 編譯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