Laravel undefined function openssl_encrypt()

后端 未结 9 2251
太阳男子
太阳男子 2020-12-09 05:49

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

相关标签:
9条回答
  • 2020-12-09 06:05

    Follow the below steps:

    • In PHP 7.4.3 duplicate "php.ini-development" file and rename it to "php.ini"
    • Then, remove the semi-colons in front of "extension=openssl", "extension=mbstring", and "extension_dir = ext" inside the "php.ini" file.

    This worked for me and I hope it helps someone else.

    0 讨论(0)
  • 2020-12-09 06:09

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

    0 讨论(0)
  • 2020-12-09 06:13

    as most point out, you need to uncomment openssl extension in php.ini.

    I was struggling with the same too and i realized php is looking for extensions in "c:\php", but mine was a xampp installation. Pointing extension_dir in php.ini to correct php extension path; in my case "c:\xampp\php.7\ext" solved the issue.

    Hope that helps somebody.

    0 讨论(0)
提交回复
热议问题