Fatal error: Call to undefined function openssl_random_pseudo_bytes()

匿名 (未验证) 提交于 2019-12-03 02:16:02

问题:

I am getting this exception when trying to run my PHP unit tests:

Fatal error: Call to undefined function openssl_random_pseudo_bytes()

What does it mean?

回答1:

I had the same issue. I solved it by editing my php.ini file - changing ;extension=php_openssl.dll to extension=php_openssl.dll .

(For my installation, my php.ini file was located in my P:\Program Files\EasyPHP-12.1\conf_files\ directory.)



回答2:

Your version of PHP wasn't compiled with the openssl module. If you are building from source, add the module like so:

cd /path/to/php-5.4/ ./configure --with-openssl 


回答3:

It means you possibly don't have openssl enabled.

If you are on windows its even easier to load it. Enable it from wamp icon on system tray.



回答4:

It means you do not have the openssl extension enabled in your PHP install. It needs to be enabled for you to use openssl_* functions.



回答5:

Your php installation either does not have openssl enabled, or you could be running a version of php

php installation documentation



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