How To Configure PHP To Support Mcrypt

In this tutorial i will write a short tutorial to install PHP to support Mcrypt.
If you are searching about Installation Apache, PHP and Mysql.
Please directly click this url http://www.wowtutorial.org/tutorial/172.html

MCrypt is a replacement for the old crypt() package and crypt(1) command, with extensions. It allows developers to use a wide range of encryption functions, without making drastic changes to their code. It allows users to encrypt files or data streams without having to be cryptographers.

Download, Extract and Install Packages
===========================

Configure libmcrypt
#wget ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/libmcrypt/libmcrypt-2.5.7.tar.gz
#tar -zxvf libmcrypt-2.5.7.tar.gz
#cd libmcrypt-2.5.7
#./configure --disable-posix-threads --enable-dynamic-loading
#make && make install

Configure Mhash
#wget http://waix.dl.sourceforge.net/project/mhash/mhash/0.9.9.9/mhash-0.9.9.9...
#tar -zxvf mhash-0.9.9.9.tar.gz
#cd mhash-0.9.9.9
#./configure
#make && make install

Configure mcrypt
#wget ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/attic/mcrypt-2.6.4.tar.gz
#tar -zxvf mcrypt-2.6.4.tar.gz
#cd mcrypt-2.6.4
#./configure --with-libmcrypt-prefix=/usr/local
#make && make install

Re-configure PHP to Support Mcrypt
#cd /root/php-5.3.0
#./configure --with-apxs2=/usr/local/apache2/bin/apxs \
--with-mysql=/usr/local/mysql \
--with-gd=/usr/local \
--with-gd=/usr/local \
--with-jpeg-dir=/usr/local/lib \
--with-zlib-dir=/usr/local \
--enable-ftp \
--with-png-dir=/usr/local/lib \
--with-freetype-dir=/usr/local \
--with-curl=/usr/local \
--with-imap=/usr/local/imap-2007e \
--enable-mbstring \
--with-mcrypt=/usr/local/bin/mcrypt
#make && make install

Restart Apache Webserver

#/usr/local/sbin/apachectl stop
#/usr/local/sbin/apachectl start

Open your Browser with IE / Firefox
http://yourdomain.com/phpinfo.php

If you see a mcrypt in your PHP modules.
It's mean you have successfully install PHP Mcrypt into your PHP.

Facebook Fans