Jump to content

mcrypt


Recommended Posts

Another extension that is not going as planned!!!

I have c:/php in my system path so I have placed the libmcrypt.dll in c:/php

I have uncommented the extension=php_mcrypt.dll

phpinfo says mcrypt is enabled BUT when I try to use it using the following code
[code] $str = "piughisdauhf pukbn;jbpiusxmdouihc ;noh ;[oc jdfhous ;jndf ;jhoucxh' hi";
echo $str;
srand((double) microtime() * 1000000);
$iv_size = mcrypt_get_iv_size(MCRYPT_SAFER128, MCRYPT_MODE_ECB);
$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);

$crypt = mcrypt_encrypt (
MCRYPT_SAFER128 ,
'lebataclan' ,
$str ,
MCRYPT_MODE_ECB ,
$iv
);
echo $crypt;
[/code]

I get the following errors..

piughisdauhf pukbn;jbpiusxmdouihc ;noh ;[oc jdfhous ;jndf ;jhoucxh' hi

Warning: mcrypt_get_iv_size(): Module initialization failed in C:\Program Files\Apache Group\Apache2\htdocs\ngc\admin\shop_ordermanager.php on line 151

Warning: mcrypt_create_iv(): Can not create an IV with size 0 or smaller in C:\Program Files\Apache Group\Apache2\htdocs\ngc\admin\shop_ordermanager.php on line 152

Warning: mcrypt_encrypt(): Module initialization failed in C:\Program Files\Apache Group\Apache2\htdocs\ngc\admin\shop_ordermanager.php on line 160

What am I missing?

Thanks in advance
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.