Using mcrypt_create_iv on PHP IIS

我怕爱的太早我们不能终老 提交于 2020-01-06 11:45:56

问题


I'm trying to set up password salting on our website, and found the PBKDF2 functions at https://defuse.ca/php-pbkdf2.htm
When I try it, I get:

Fatal error: mcrypt_create_iv(): Could not gather sufficient random data in include\PBKDF2.php on line 23

I'm not sure if I need to do anything to make this work. It's running on IIS7.5


回答1:


For those who are still facing error:

Fatal Error: Call to undefined function mcrypt_create_iv()

Please check the phpversion and correspondingly make sure to go to php.ini file and add the line or uncomment:

extension=php_mcrypt.dll

I was able to get solution from here http://tech.domainstack.in/how-to-enable-mcrypt-on-the-server/




回答2:


I was using PHP 5.3.6, which apparently has a bug with mcrypt_create_iv().
Switched to the latest version 5.4.7 and it started working.



来源:https://stackoverflow.com/questions/12534802/using-mcrypt-create-iv-on-php-iis

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!