php5.3上扩展mcrypt模块


由于最近需要对php的模块进行扩展,所以进行了简单整理,过程如下。

问题的解决

#!/bin/bash
cur_dir=${pwd}
tar zxvf libmcrypt-2.5.8.tar.gz
cd libmcrypt-2.5.8
./configure
make && make install

cd ..
tar xvf mhash-0.9.9.9.tar.bz2
cd mhash-0.9.9.9
./configure
make && make install

cd ..
tar zxvf m4-1.4.9.tar.gz 
cd m4-1.4.9
./configure
make && make install

cd ..
tar zxvf autoconf-2.62.tar.gz 
cd autoconf-2.62
./configure
make && make install

cd ..
tar zxvf mcrypt-2.6.8.tar.gz
cd mcrypt-2.6.8
LD_LIBRARY_PATH=/usr/local/lib ./configure 
make && make install

cd ..
tar zxvf php-5.2.17.tar.gz
cd php-5.2.17/ext/mcrypt/
/usr/local/
php/bin/phpize
./configure  --with-php-config=/usr/local/php/bin/php-config  
make && make test && make install



cp /usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/mcrypt.so /usr/local/php

service httpd restart

其他模块的扩展可以依葫芦画瓢,没有难度的。

[root@chcp-ct01-log01 mcrypt]# php -m
[PHP Modules]
bcmath
Core
ctype
curl
date
dom
ereg
fileinfo
filter
gd
gettext    
hash
iconv
json
libxml
mbstring

mcrypt

mysql
pcre
PDO
pdo_sqlite
Phar
posix
Reflection
session
SimpleXML
sockets
SPL
SQLite
sqlite3
standard
tokenizer
xml
xmlreader
xmlwriter
Zend Guard Loader
zlib
[Zend Modules]
Zend Guard Loader