Alex Rivera | Logout

Fatal error: Call to undefined function openssl_random_pseudo_bytes()

Asked 2012-06-26T17:27:36.623
18

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?

Edit
Report

2 Answers

10

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
answered 2012-06-26T17:28:37.230
1

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

To enable openssl, you must re-compile and install php with the "–with-openssl" flag. See php installation documentation

answered 2012-10-26T06:10:59.760

Your Answer