Now: Tutorial for Web and Software Design > PHP > QA > PHP Content
> 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

[Bookmark][Print] [Close][To Top]
  • Prev Article-PHP:

  • Next Article-PHP:
  • Related Materias
    PHPFAQ - How google is you
    PHPFAQ - Are there any web
    PHPFAQ - How can I accept 
    PHPFAQ - How can I finance
    PHPFAQ - Where can I get P
    PHPFAQ - Where can I host 
    PHPFAQ - Where can I find 
    PHPFAQ - I am trying to cr
    PHPFAQ - Is there a librar
    PHPFAQ - How can I manage 
    Topics
    Photoshop Tutorial
     

    Special Effect

      3D Effect
      Photoshop Articles
    Programming Tutorial
     

    C/C++ Tutorial

      Visual Basic
      C# Tutorial
    Database Tutorial
     

    MySQL Tutorial

      MS SQL Tutorial
      Oracle Tutorial
    Graphic Design Tutorial
     

    Coreldraw Tutorial

      Illustrator Tutorial
      3D Graphics Articles
    Webmaster Articles
     

    Domain Service

      Web Hosting
      Site Promotion
    Java Tutorial&Articles
     

    Java Servlets

      JavaEE Tutorial
     

    JavaBeans Tutorial

    XML Tutorial&Articles
     

    XML Style Tutorial

      AJAX Tutorial
      XML Mobile
    Flash Tutorial&Articles
     

    Flash Video

      Action Script
      Flash Articles
    OS Tutorial&Articles
     

    Linux Tutorial

      Symbian Tutorial
      MacOS Tutorial