Page 1 of 1

~~ mcrypt - solution ~~

PostPosted: 28. April 2007 04:08
by Starrie
Hello everyone!

I have posted this topic to explain to anyone who might have been as confused as i was for a while on how to setup mcryt, because sincerily there arn't many recent topics explaining this.

so if you log into phpMyAdmin and it says Cannot load mcrypt extension. Please check your PHP configuration, then you have to do the following:

Go to *path to XAMPP*\Apache\bin\php.ini and cahnge

Code: Select all



Now go to *path to XAMPP*\php\php.ini and change

Code: Select all



Save both files, close and voila!

that should make mcrypt work now :D

P-S: For those of you that are REALLY new to this, you are basically only taking the semi-colons ( ; ) off from the begining of the line.

Still having troubles...

PostPosted: 12. June 2007 18:20
by kaimn_ryu
Hi Starrie. I've followed your post on how to enable encryption in XAMPP. I'm still having troubles using the libraries.
this is my code so far:

$llave = "key";
$entrada = "This is my encripted message";

$datos_cifrados = mcrypt_ecb (MCRYPT_3DES, $llave, $entrada, MCRYPT_ENCRYPT);
echo $datos_cifrados;

This code gives me this message:

Warning: mcrypt_ecb() [function.mcrypt-ecb]: Attempt to use an empty IV, which is NOT recommend in C:\xampplite\htdocs\Samples\ejemplo.php on line 5

PostPosted: 13. June 2007 13:24
by MicroX
Starrie I'm having the same trouble, i was hoping your solution would work. I did the changes you suggest and i still get the same error when i open phpmyadmin. Is there more to edit that was not mention here?

add Initialisation Vector

PostPosted: 22. August 2007 01:26
by j_chakraverty
Copying from the Manual

String mcrypt_ecb ( int $cipher, string $key, string $data, int $mode )

string mcrypt_ecb ( string $cipher, string $key, string $data, int $mode [, string $iv] )

Use the second method. Just check wikipedia for IV to understand the theory. Goes back to analogue encryption devices

Re: ~~ mcrypt - solution ~~

PostPosted: 01. March 2009 01:17
by hotdog
PROBLEM: cannot load mcrypt extension. please check your php configuration

I have done as suggested at and copied libmcrypt.dll from F:\wamp\bin\php\PHP52~1.8 to C:\WINDOWS\system32 . This did not work on it's own. I found other advice as follows at this forum and now mcrypt is working.

OTHER ADVICE: (not exactly as from other contributor, but found my way from there..)

Go to F:\wamp\bin\php\PHP52~1.8\php.ini
change ;extension=php_mcrypt.dll
to extension=php_mcrypt.dll
(ie. remove ; )

now go to the following 2 files and do the same:

Please adjust the directory location per your own installation.
Lesson again is you got to look around. so many different situations! custom, custom..

Re: ~~ mcrypt - solution ~~

PostPosted: 01. March 2009 02:19
by Izzy
hotdog wrote:Please adjust the directory location per your own installation.
This is an XAMPP forum not a wamp forum and your paths are totally irrelevant as is your post in a very old topic.

Re: ~~ mcrypt - solution ~~

PostPosted: 12. July 2009 04:27
by iceblock
Be sure to appropriately set the extension_dir directive.

extension_dir= "c:\xampp\php\ext"