I use laravel5.1 and it works fine on php cli. But i publish my porject to apache(version == 2.4), the problem happened.
FatalErrorException in Encryp
On Windows Open php.ini and change path where are locate php ext
extension_dir = "C:\php\ext"
First make sure you installed the openssl extension (spotted by deceze), then:
php.ini
file extension=php_openssl.dll
I'm expecting this to be the problem.
I solved same issue by copying libeay32.dll and ssleay32.dll from PHP root folder to Apache/bin folder and then restarted Apache.
I'm using nginx, and my nginx installation contained a PHP folder, something like below:
C:\Users\myusername\Downloads\nginx\php\php.ini
I moved the nginx above to the root directory of C:\
and it solved the problem.
If you using the Wamp server then it's happens. In Xampp server there is no need to uncomment php_openssl.dll.
To solve this Remove the semicolon before
extension = php_openssl.dll
in php.ini