How To Install mcrypt For PHP53 On CentOS
To get mcrypt support for PHP 5.3, compile and install just the mcrypt extension.
First, get the prerequisites:
1 |
yum install php53-devel libmcrypt-devel gcc gcc-c++ |
Download the php source code from php.net, for example:
1 2 |
wget http://mx2.php.net/get/php-5.3.6.tar.bz2/from/us3.php.net/mirror tar xvjf php-5.3.6.tar.bz2 |
Now, cd to the proper place and follow these steps:
1 2 3 4 5 6 |
cd php-5.3.6/ext/mcrypt/ phpize aclocal ./configure make make install |
Create the configuration file for MCrypt /etc/php.d/mcrypt.ini
containing:
1 |
extension=mcrypt.so |
Restart apache:
1 |
service http restart |
Create a file with phpinfo just to check if the extension was loaded:
1 2 3 |
<?php phpinfo(); ?> |
Eric Stone | Eric M. Stone | Eric Michael Stone | Random Thoughts, Whims and Fancies said on August 22, 2011, 2:39 pm:
[…] To get mcrypt installed, read this post: http://www.ericmichaelstone.com/?p=4702 […]