Przemek Wojtas
Przemek Wojtas

Reputation: 1371

Call to undefined function Illuminate\Encryption\openssl_decrypt()

I am using xampp and windows along with laravel, everything was working fine, but when I finished work and turned of xampp and try to open my work today morning, this is what I get:

FatalThrowableError in Encrypter.php line 100:
Fatal error: Call to undefined function Illuminate\Encryption\openssl_decrypt()

Encrypter.php is a standard laravel file and I have not even touched it. My extension is turned on.

extension=php_openssl.dll

What might be wrong?

Upvotes: 21

Views: 79535

Answers (6)

Molnár Levente
Molnár Levente

Reputation: 26

Hi! I had this same issue, I got these dlls and YAY openssl.dll is working again. Try this in the cmd:

C:\php> .\deplister.exe .\ext\php_openssl.dll
php8.dll,OK
libcrypto-1_1-x64.dll,OK
libssl-1_1-x64.dll,OK
CRYPT32.dll,OK
KERNEL32.dll,OK
WS2_32.dll,OK
VCRUNTIME140.dll,OK
api-ms-win-crt-time-l1-1-0.dll,OK api-ms-win-crt-heap-l1-1-0.dll,OK
api-ms-win-crt-runtime-l1-1-0.dll,OK
api-ms-win-crt-stdio-l1-1-0.dll,OK
api-ms-win-crt-convert-l1-1-0.dll,OK
api-ms-win-crt-environment-l1-1-0.dll,OK
api-ms-win-crt-string-l1-1-0.dll,OK api-ms-win-crt-math-l1-1-0.dll,OK

Upvotes: 0

Aryan
Aryan

Reputation: 144

This problem can also arise if incorrect php.ini file is loaded. Make sure in your config php_module is defined in the httpd.conf

<IfModule php_module>
    PHPINIDir "C:/xampp/php"
</IfModule>

Upvotes: 0

dipenparmar12
dipenparmar12

Reputation: 3455

Modify php.ini and enable openssl extension in you php environment.

To find php installation path, run below command in terminal or cmd

php --ini

Output something like below:

Configuration File (php.ini) Path: C:\Windows
Loaded Configuration File:         C:\php-7.3.8\php.ini
Scan for additional .ini files in: (none)
Additional .ini files parsed:      (none)

here mine is Loaded Configuration File is C:\php-7.3.8\php.ini

open php.ini with any editor using vim, nano, notepad++ or any editor.

find extension=openssl remove ;

from ;extension=openssl to extension=openssl

save and restart server.

Upvotes: 9

user13654068
user13654068

Reputation: 261

Just edit php.ini file and uncomment by removing ";" before this line --extension=openssl. in php.ini file. and it will start working properly.

Upvotes: 26

thens
thens

Reputation: 39

composer install

didn't fix the problem, but the following does:

composer update

Upvotes: -1

guyver4mk
guyver4mk

Reputation: 609

If you have shut XAMPP down and restarted it, it may be worth running the composer install command again, or simply running composer update to ensure that all dependancies are being loaded correctly.

Upvotes: 17

Related Questions