Results 1 to 4 of 4

Thread: installing mcrypt extension

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2007
    Posts
    13

    Default installing mcrypt extension

    Hi,
    I would like to enable the mcrypt extension in php. I've never installed an extension before I would appreciate it if someone could help walk me through the necessary steps I need to take. After searching around online I've gathered a little info:
    First I need to install libmcrypt:
    http downloads.sourceforge.net/mcrypt/libmcrypt-2.5.7.tar.gz
    Then I can install mcrypt:
    http downloads.sourceforge.net/mcrypt/mcrypt-2.6.4.tar.gz

    There is also an rpm available to install mcrypt here:
    http phprpms.sourceforge.net/mcrypt

    My problem is that I have no idea how to complete these steps on the command line. Do I need to get to a specific directory before I can download and install these files? I believe I need to use the yum command to install the rpm, however when I simply typed in yum on the command line I got "command not found" response. I'm very new to this, any help is appreciated! Thanks,
    Dave

  2. #2
    Forum Administrator Power Poster Lyle@Spry's Avatar
    Join Date
    May 2005
    Posts
    455

    Default

    Quote Originally Posted by black_box
    Hi,
    I would like to enable the mcrypt extension in php. I've never installed an extension before I would appreciate it if someone could help walk me through the necessary steps I need to take. After searching around online I've gathered a little info:
    First I need to install libmcrypt:
    http downloads.sourceforge.net/mcrypt/libmcrypt-2.5.7.tar.gz
    Then I can install mcrypt:
    http downloads.sourceforge.net/mcrypt/mcrypt-2.6.4.tar.gz

    There is also an rpm available to install mcrypt here:
    http phprpms.sourceforge.net/mcrypt

    My problem is that I have no idea how to complete these steps on the command line. Do I need to get to a specific directory before I can download and install these files?
    No.
    Quote Originally Posted by black_box
    I believe I need to use the yum command to install the rpm,
    No, if you have the rpm file on the system already, just type
    Code:
    rpm -i <path to rpm file>
    Quote Originally Posted by black_box
    however when I simply typed in yum on the command line I got "command not found" response.
    yum is not installed.
    Quote Originally Posted by black_box
    I'm very new to this, any help is appreciated! Thanks,
    Dave

  3. #3
    Junior Member Newbie
    Join Date
    Jan 2007
    Posts
    13

    Default

    Lyle,
    Thanks for the tips.

    I've attempted to install libmcrypt, mhash, and mcrypt from source, based on directions found here:
    alt-php-faq.org/local/95/

    The one adjustment I had to make (in case anyone else attempts these steps) is to use a newer version of mhash: the one linked to at the above location is not the latest and does not install properly.

    I've copied all the libmcrypt.* and libmhash files to my /usr/lib directory.

    Unfortunately, here's where I'm lost...
    I can't find a mcrypt.so file anywhere, although I can run mcrypt from the command line in my /usr/local/bin directory so I feel like it is installed correctly.

    Do I have to recompile my PHP to get it to work? I'd rather load it as a dynamic extension like the other extensions that came preinstalled with PHP, such as mysql.so, soap.so, etc. But since I can't find a mcrypt.so it probably doesn't exist yet?

    I tried running phpize from the directory where I downloaded the source files to (/usr/sr) but I got this error:
    Cannot find config.m4.
    Make sure that you run '/usr/bin/phpize' in the top level source directory of the module

    Do you have any suggestions for what I should try next? Thanks for reading all this!!

    -Dave

  4. #4
    Junior Member Newbie
    Join Date
    Jan 2007
    Posts
    13

    Default

    I went ahead and grabbed the rpm for FC4 from:
    prdownloads.sourceforge.net/phprpms/php-mcrypt-5.0.4-10.1.i386.rpm

    When I first tried installing this it gave me a "failed dependencies" error since I installed libmcryp and mhash from source rpm didn't have it's own record of creating and locating these files. I went ahead and ran:

    rpm -i php-mcrypt-5.0.4-10.1.i386.rpm --nodeps

    to force the install and ignore the dependency error. Lo and behold I now have mcrypt in my phpinfo!!!

    I have yet to check that it's actually working properly, but this feels like progress...

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •