centos源碼編譯php5 mcrypt模塊步驟詳解
步驟:
1.從php.net上面下載php5.3.x版本的源碼;
2.centos安裝相應的擴展包:
yum install libmcrypt libmcrypt-devel mcrypt mhash
下面的開發(fā)環(huán)境是為了編譯整個php源碼準備的環(huán)境,此次編譯mcrypt擴展不需要執(zhí)行.
yum install -y httpd-devel libtool-ltdl libtool-ltdl-devel openssl-devel curl-devel \
libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel \
libc-client libc-client-devel gd gd-devel libmcrypt libmcrypt-devel \
sqlite sqlite-devel mysql-devel libicu libicu-devel pcre-devel
3.確定phpize有安裝到服務器:
whereis phpize
確定php-config的位置:
whereis php-config
執(zhí)行:
./configure –with-php-config=/usr/bin/php-config
4.make錯誤:
mcrypt.c:283: error: ‘PHP_FE_END' undeclared here (not in a function)
解決方法:
sed -i 's|PHP_FE_END|{NULL,NULL,NULL}|' ./ext/**/*.c
make
如果是ZEND_MOD_END的錯誤,則執(zhí)行:
sed -i 's|ZEND_MOD_END|{NULL,NULL,NULL}|' ./ext/**/*.c
5.執(zhí)行下 make test,測試沒有問題.再執(zhí)行:
make install
6.增加文件: /etc/php.d/mcrypt.ini
; Enable mbstring extension module
extension=mcrypt.so
7.重啟web服務器,檢查php mcrypt是否安裝成功.
相關文章
Linux下查看CPU型號,內存大小,硬盤空間的命令(詳解)
下面小編就為大家?guī)硪黄狶inux下查看CPU型號,內存大小,硬盤空間的命令(詳解)。小編覺得挺不錯的,現(xiàn)在就分享給大家,也給大家做個參考。一起跟隨小編過來看看吧2016-11-11Linux下PHP網(wǎng)站服務器安全配置加固防護方法【推薦】
本文詳細總結了PHP網(wǎng)站在Linux服務器上面的安全配置,包含PHP安全、mysql數(shù)據(jù)庫安全、web服務器安全、木馬查殺和防范等,很好很強大很安全。感興趣的朋友跟隨腳本之家小編一起看看吧2018-08-08解決Ubuntu下使用linuxdeployqt打包Qt程序問題
這篇文章主要介紹了解決Ubuntu下使用linuxdeployqt打包Qt程序問題,本文給大家介紹的非常詳細,具有一定的參考借鑒價值,需要的朋友可以參考下2019-07-07