Reputation: 291
in phpinfo(); results give me this
OpenSSL support disabled (install ext/openssl)
extension=php_openssl.dll
set OPENSSL_CONF=/path/to/openssl.cnf
php --ri openssl OpenSSL support => enabled OpenSSL Library Version => OpenSSL 1.0.2j 26 Sep 2016 Openssl default config => C:/jampp/php71/extras/ssl/openssl.cnf
its now working in CMD and but phpinfo(); not and in laravel 5 show me this error
Call to undefined function openssl_encrypt()
Thanks
Upvotes: 9
Views: 18765
Reputation: 61
Apply this solution if nothing works like removing semicolon, or extension_dir = ext or absolute path etc, etc...
Open the php folder , find snapshot.txt and open it, in it find
libcrypto-3-x64.dll
libssl-3-x64.dll
Now, in this module u are seeing dependency modules which are necessary to be in the apache/bin folder to get enabled. You will find libcrypto-3-x64.dll and libssl-3-x64.dll in php folder itself. Just copy and paste them in apache/bin folder. After that just restart your apache server and openssl support will be enabled.
Well if this solution doesn't work then first check whether you removed semicolon from "extension=openssl" , " extension_dir=ext " and absolute path " extension_dir=C:\PHP8\ext" in the php.ini file or not. If yes then, open cmd terminal and write php --ri openssl , there you will see whether openssl is enabled by php, if it is enabled then you can apply my above solution.
Your Openssl support will definitely be enabled.
Regards, Shane Cox
Upvotes: 6
Reputation: 346
I have added new php version 8.2.1
today
extension_dir = "ext"
extension=openssl
openssl
is enabled
4. Exit wamp and also restarted All services
Still the Problem persisted on phpinfo() and phpmyadmin
The solution worked for me after all is to Restart my laptop
Upvotes: 2
Reputation: 111
Another possible solution for anyone struggling to enable OpenSSL on Windows. Run php --ini
to check whether your ini file is being ran. In my case the configuration file was set to none.
My php installation came with development and production ini files, but I needed to create a new ini file called php.ini and include my settings there.
If anyone else is struggling to install composer, this fix may work for you :)
Upvotes: 3
Reputation: 3457
Updated Answer 2021:
OpenSSL is in version 1.1 now. The LoadFiles file in another answer on this page have been replaced by 'libcrypto-1_1.dll' and 'libssl-1_1.dll'.
Honestly, though, that entire answer is probably outdated. In my case, the solution was far simpler. Everything I found on the internet says all you have to do is uncomment the line 'extension=openssl' in your php.ini file. However, there is usually a small piece of information omitted. You ALSO need to uncomment the line 'extension_dir = "ext"' on Windows or 'extension_dir = "./" on Linux. If you don't do this, then no extensions can load.
Upvotes: 0
Reputation: 291
Thank you all its just need includes the (DLLs files of php) into httpd.conf
LoadFile "C:/jampp/php/libeay32.dll"
LoadFile "C:/jampp/php/ssleay32.dll"
LoadFile "C:/jampp/php/php7ts.dll"
LoadFile "C:/jampp/php/libpq.dll"
Upvotes: 19