Laravel undefined openssl_encrypt () function

I am using laravel5.1 and it works fine on php cli. But I publish my file on apache (version == 2.4), a problem has occurred.

FatalErrorException in line Encrypter.php 67:
Undefined function call openssl_encrypt ()

+9
source share
6 answers

First, make sure you install the openssl extension (seen by deceze ), then:

  • Go to php.ini file
  • Remove the semicolon before extension=php_openssl.dll
  • Restart Apache

I expect this is a problem.

+17
source

I solved the same problem by copying libeay32.dll and ssleay32.dll from the PHP root folder to the Apache / bin folder, and then restarted Apache.

+6
source

like most of them, you need to uncomment the openssl extension in php.ini.

I also struggled with the same, and I realized that php was looking for extensions in "c: \ php" , but mine was an xampp installation. Specifying extension_dir in php.ini to fix the php extension path; in my case, "c: \ xampp \ php.7 \ ext" solved the problem.

Hope someone helps.

+4
source

If you use a Wamp server, this will happen. There is no need to uncomment php_openssl.dll on the Xampp server.

To resolve this issue, remove the semicolon

 extension = php_openssl.dll 

in php.ini

+2
source

I am using wampserver and I had the same problem. Openssl was included in php.ini, but there is another ini called phpForApache that has a line to enable openssl. It worked for me.

0
source

Espero aun te pueda servir.

Error de Laravel 5 "Function not defined, Light \ Encryption \ openssl_cipher_iv_length ()"

https://www.marathon-studios.com/blog/solved-laravel-5-error-undefined-function-illuminateencryptionopenssl_cipher_iv_length/

0
source

All Articles