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

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
#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
#tar -zxvf mhash-
#cd mhash-
#make && make install

Configure mcrypt
#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 \
#make && make install

Restart Apache Webserver

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

Open your Browser with IE / Firefox

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

Facebook Fans