I'm trying to install libmcrypt.dll in my local copy of PHP.

I have a windows machine (xp Pro)

I follow the directions from the official php site:
http://us2.php.net/mcrypt

I tried to follow these vague instructions:
http://ftp.emini.dk/pub/php/win32/mcrypt/old/README.txt

When I placed everything in the right spot and i try to see if I can see it in my phpinfo(); I get an error message...

Unknown(): Invalid library (maybe not a php library) 'libcrypt.dll'

This is where I put it:
C:\PHP\extensions

And this is what i added to my php.ini:
extension_dir = "c:\php\extensions"
extension=libmcrypt.dll

Am i doing something wrong here? please help

THANKS

Chris

    10 days later
    a year later
    chrissanz wrote:

    Thanks dude 🙂

    I found the answer already...

    I have the same problem, what was the solution?

    BTW, your idea produced a similar error Merve, thanks for the input anyway though.

      nubs wrote:

      I have the same problem, what was the solution?

      BTW, your idea produced a similar error Merve, thanks for the input anyway though.

      libmcrypt.dll must go in one of your system folders, should be C:/windows/system32 on winxp.
      then the php_mcrypt.dll (which ships with php) should be in your extension_dir, and in php.ini extension=php_mcrypt.dll should be uncommented by removing the ; from in front of it

      1. put libmcrypt.dll in windows system32 folder
      2. make sure php_mcrypt.dll is in php extension directory
      3. make sure php.ini directive extension_dir points to the right path
      4. uncomment ;extension=php_mcrypt.dll from php.ini
      5. thats it, should work now

        Heh, cheers Drue, your a legend, but I just figured that out and was coming back to post the solution. I (and I'm guessing chrissanz and the others with the same problem on Google) was installing it like an extension and not like a library.

        I was trying to use:
        extension=libmcrypt.dll
        in php.ini

        I even renamed it at one stage to mycrypt.dll because I though that that's what the readme was saying. My problem was the extra 'y'. If I had realised that it was 'mcrypt' and not 'mycrypt' I would have spotted the dll and the reference in php.ini and would have worked things out faster.

        BTW, for anybody else with the same problem, you just need to add the libmcrypt to any folder that is a system path. For me, once I realised my error, I just added it to my root PHP directory, uncommented the ;extension=php_mcrypt.dll line in php.ini and restarted the server and everything worked.

        So pretty much the same process that Drew described.

        Cheers again Drew, you were about 5 micro seconds late to help me with my stupidity, but I'm sure the next sucker will be along via a Google search any time soon. =D

          Write a Reply...