How to build mcrypt.so

When installing phpMyAdmin, one of the PHP extension require is mcrypt. Here is how to manually build it.

First you need libmcrypt header to build it. So, we download the libmcrypt from here. Extract the file to a folder

./configure --disable-posix-threads --enable-static
make
sudo make install

After that, download PHP source code.

cd ~/Downloads/php-5.3.0/ext/mcrypt
phpize
./configure
make
cd modules
sudo cp mcrypt.so /usr/lib/php/extensions/no-debug-non-zts-20090626/
Advertisements