| > |
PHPFAQ - How did you install PHP with --mcrypt and --mhash? |
[Bookmark it] |
|
|
| PHPFAQ - How did you install PHP with --mcrypt and --mhash? |
|
Question : How did you install PHP with --mcrypt and --mhash?Answer :This works for us, let us know if you have other ways to do the install.
wget http://kent.dl.sourceforge.net/sourceforge/mcrypt/libmcrypt-2.5.7.tar.gz
tar -pxzf libmcrypt-2.5.7.tar.gz
cd libmcrypt-2.5.7
./configure --disable-posix-threads
make
make install
cd ..
echo "/usr/local/lib/libmcrypt" >>/etc/ld.so.conf
ldconfig
cd /usr/src
wget http://kent.dl.sourceforge.net/sourceforge/mhash/mhash-0.9.4a.tar.gz
tar -pxzf mhash-0.9.4a.tar.gz
cd mhash-0.9.4
./configure
make
make install
cd ..
cd /usr/src
wget http://easynews.dl.sourceforge.net/sourceforge/mcrypt/mcrypt-2.6.4.tar.gz
tar -pxzf mcrypt-2.6.4.tar.gz
cd mcrypt-2.6.4
./configure
make
make install
cp /usr/local/lib/libmcrypt.* /usr/lib
ln -s /usr/local/lib/libmhash.so.2 /usr/lib/libmhash.so.2
ldconfig
Update
Using the above for PHP4.2.2 we had a segfault ever time we started apache. This was fixed by removing all the old files :-
rm /usr/lib/libmcrypt.*
rm -r /usr/local/lib/libmcrypt
Then reinstalling all the latest versions. It could have been where we had older versions installed. But the above versions worked for us with PHP4.2.2
|
|
|
|
|
|
|