致命错误:调用未定义函数openssl_random_pseudo_bytes() [英] Fatal error: Call to undefined function openssl_random_pseudo_bytes()

查看:473
本文介绍了致命错误:调用未定义函数openssl_random_pseudo_bytes()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试运行我的PHP单元测试时出现此异常:

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

严重错误:调用未定义函数openssl_random_pseudo_bytes()

Fatal error: Call to undefined function openssl_random_pseudo_bytes()

这是什么意思?

推荐答案

您的PHP版本未使用openssl模块进行编译.如果您是从源代码构建的,请添加模块,如下所示:

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

这篇关于致命错误:调用未定义函数openssl_random_pseudo_bytes()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆