Reputation: 6117
I downgraded to PHP 5.2.8
from PHP 5.4.2
for a reason, I enabled the mcrypt
extension, but when I run the function mcrypt_create_iv ($size, MCRYPT_DEV_RANDOM)
, it doesn't execute properly, and I get the following warning
Warning: mcrypt_create_iv() [function.mcrypt-create-iv]:Cannot open source device
Please how do I fix this issue? Thanks for any suggestion.
Upvotes: 1
Views: 4270
Reputation: 6117
The issue occurred because MCRYPT_DEV_URANDOM
was only supported on Windows as from PHP version 5.3.0
, that is why it was working well until the downgrade.
I changed to MCRYPT_RAND
which worked on previous versions and the problem was solved.
Upvotes: 3