Topic on Project:Support desk

mcrypt_create_iv() [function.mcrypt-create-iv]: Cannot open source device

6
220.244.187.239 (talkcontribs)

Hi,

I have installed version 1.19.1 on my host (windows based host) by I receive warning on top of the page when I go to wiki page at http://help.flexrule.com/wiki

Any idea why I get "mcrypt_create_iv() [function.mcrypt-create-iv]: Cannot open source device" warning?

Regards, Arash

Bawolff (talkcontribs)

There's been several reports of mcrypt failing on windows. See bugzilla:35894.

Assuming it lets you install, don't worry about the error, and after install, edit LocalSettings.php and change $wgSecretKey to something random.

203.34.100.2 (talkcontribs)

Hi,

I have entered some data already, does this change to $wgSecretKey would make new entries unusable?

Regards, Arash

Bawolff (talkcontribs)

It may cause people who are logged in to become logged out (They would have to re-login). It should not affect anything else.

There's information on what $wgSecretKey is used for here.

88.200.210.178 (talkcontribs)

Locate the file includes/CryptRandom.php. Find the following line (probably around line 285): $iv = mcrypt_create_iv( $rem, MCRYPT_DEV_URANDOM ); Change it to: $iv = mcrypt_create_iv( $rem, MCRYPT_RAND );

Kghbln (talkcontribs)

So if I cannot modify "CryptRandom.php" I still will have to make sure that $wgSecretKey is not leaked as in versions prior to MW 1.17 (well, I should do so anyway, but I guess you will get the point).

Reply to "mcrypt_create_iv() [function.mcrypt-create-iv]: Cannot open source device"