You are here: Re: MCRYPT « PHP Programming Language « IT news, forums, messages
Re: MCRYPT

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация