|
Posted by Peter van Schie on 07/14/05 00:40
FD wrote:
> I am having a big problem with the following line... it runs very well
> on linux but I don't get why it doesn't work on winxp
> $_SESSION['_mcrypt_iv'] =
> mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256,
> MCRYPT_MODE_ECB), MCRYPT_DEV_URANDOM);
>
> I am getting a warning
> Warning: mcrypt_create_iv(): Cannot open source device in
> C:\apache\htdocs\filename.php
>
> any suggestion..
>
> thanks
>
Hi FD,
It means that the function cannot open the device /dev/urandom, while
you are referring to that by using MCRYPT_DEV_URANDOM as the second
parameter (source). Since you're trying this on Windows you don't have a
/dev/urandom, so the only option is to use MCRYPT_RAND (rand() function)
as the second parameter.
HTH.
--
http://www.phpforums.nl
Navigation:
[Reply to this message]
|