I get the following error:
Call to undefined function openssl_encrypt() in Encrypter.php line 73
It may seem obvious, but OpenSSL extension is enabled in my config, this error occurs only when using artisan serve
, looked through config and it is enabled.
Did some research:
Copied the following code in the artisan
file
$loaded = extension_loaded('openssl');
var_dump($loaded);die();
And it returned true
. But when I copy the same code into /public/index.php
it returns false
.
So I assumed that the openssl
extension is enabled in php-cli
, but for some reason it gets disabled after reaching the bootstrap file.
*And I am using UniServer if someone is interested.