Jump to content
The Uniform Server Community

mcrypt doesn't load


Recommended Posts

Posted

Cannot get mcrypt to load in appollo. I have :

 

1. download libmcrypt.dll and place it in \usr\local\php\extensions (also in windows\system32 and \usr\local\php)

 

2. added "extension=libmcrypt.dll" to php.ini

 

3. reboot

 

help! or other encrypt-decrypt options.

Posted

There are a few things wrong! Some are now of your making this is no reflection on you because it extends from a missing extension. You understand what I mean after following these steps to get it working:

 

1) Reverse what you have done:

a) Delete libmcrypt.dll from system32 folder.

B) libmcrypt.dll is in the correct folder *\Uniform Server\udrive\usr\local\php :)

d) Open php.ini and delete the line you added "extension=libmcrypt.dll"

2) Locate the line ;extension=php_mcrypt.dll and un-comment to give extension=php_mcrypt.dll

3) Its this file (php_mcrypt.dll) you are missing and may have lead to the confusion. To save you legwork I have attached the file, download (double click to extract file) and save it to folder *\Uniform Server\udrive\usr\local\php\extensions

4) Restart the servers and it should work! :)

 

I have never used this function though I would give it a bash and run the examples from http://uk2.php.net/mcrypt :)

 

This code:

 

<?php

$key = "this is a secret key";

$input = "Let us meet at 9 o'clock at the secret place.";

$encrypted_data = mcrypt_ecb (MCRYPT_3DES, $key, $input, MCRYPT_ENCRYPT);

?>

 

Promptly produced this error:

Warning: mcrypt_ecb() [function.mcrypt-ecb]: Attempt to use an empty IV, which is NOT recommend :)

 

I do not have an issue with that, show the modules work. :)

 

Interestingly this works:

 

<?php

$key = "this is a secret key";

$input = "Let us meet at 9 o'clock at the secret place.";

 

$td = mcrypt_module_open('tripledes', '', 'ecb', '');

$iv = mcrypt_create_iv (mcrypt_enc_get_iv_size($td), MCRYPT_RAND);

mcrypt_generic_init($td, $key, $iv);

$encrypted_data = mcrypt_generic($td, $input);

mcrypt_generic_deinit($td);

mcrypt_module_close($td);

 

echo $encrypted_data;

?>

 

Makes for an interesting display :lol: (Note IV in this example has been defined).

 

Have fun

 

All the best

Ric :)

double_click_to_extract.exe

Posted

Ric,

 

Thanks, thanks, thanks!!! I did a clean install on another computer and all is fine. I spent almost a full day chasing over the 'net looking for mcrypt-windows solutions. One was to put in windows/system32 folder; another to use mcrypt.exe. Where did you find php_mcrypt.dll?

 

Thanks again for your prompt help. This is my first request for help and I have been using uniformserver for about 3 years - and never needed help as it works so flawlessly- and it is great!

 

To help support uniform server I just made a contribution via paypal and I urge all satisfied uses to do the same in support of such a great effort.

 

-raptor

 

 

 

There are a few things wrong! Some are now of your making this is no reflection on you because it extends from a missing extension. You understand what I mean after following these steps to get it working:

 

1) Reverse what you have done:

a) Delete libmcrypt.dll from system32 folder.

B) libmcrypt.dll is in the correct folder *\Uniform Server\udrive\usr\local\php :)

d) Open php.ini and delete the line you added "extension=libmcrypt.dll"

2) Locate the line ;extension=php_mcrypt.dll and un-comment to give extension=php_mcrypt.dll

3) Its this file (php_mcrypt.dll) you are missing and may have lead to the confusion. To save you legwork I have attached the file, download (double click to extract file) and save it to folder *\Uniform Server\udrive\usr\local\php\extensions

4) Restart the servers and it should work! :)

 

I have never used this function though I would give it a bash and run the examples from http://uk2.php.net/mcrypt :)

 

This code:

 

<?php

$key = "this is a secret key";

$input = "Let us meet at 9 o'clock at the secret place.";

$encrypted_data = mcrypt_ecb (MCRYPT_3DES, $key, $input, MCRYPT_ENCRYPT);

?>

 

Promptly produced this error:

Warning: mcrypt_ecb() [function.mcrypt-ecb]: Attempt to use an empty IV, which is NOT recommend :)

 

I do not have an issue with that, show the modules work. :)

 

 

Interestingly this works:

 

<?php

$key = "this is a secret key";

$input = "Let us meet at 9 o'clock at the secret place.";

 

$td = mcrypt_module_open('tripledes', '', 'ecb', '');

$iv = mcrypt_create_iv (mcrypt_enc_get_iv_size($td), MCRYPT_RAND);

mcrypt_generic_init($td, $key, $iv);

$encrypted_data = mcrypt_generic($td, $input);

mcrypt_generic_deinit($td);

mcrypt_module_close($td);

 

echo $encrypted_data;

?>

 

Makes for an interesting display :lol: (Note IV in this example has been defined).

 

Have fun

 

All the best

Ric :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...