php的mcrypt模块

首先要下载2个软件,1个是libmcrypt

下载地址: http://sourceforge.net/project/showfiles.php?

group_id=87941&package_id=91774&release_id=487459

1个是php,下载地址:http://museum.php.net/php5/php-5.2.16.tar.gz

1、先安装libmcrypt
 
# tar zxf libmcrypt-2.5.8.tar.gz
# cd libmcrypt-2.5.8
# ./configure
# make && make install
 
2、
 
# tar zxf php-5.2.16.tar.gz -C /usr/src
# cd /usr/src/php-5.2.16/ext/mcrypt
# /usr/local/php/bin/phpize
# ./configure --with-php-config=/usr/local/php/bin/php-config
# make && make install
# cp /usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/mcrypt.so  /usr/lib/php/modules/
# vi /usr/local/php/etc/php.ini
[mcrypt]
extension=mcrypt.so
:wq
 
验证:
用test.php(即 <? phpinfo(); >)可以查看出来