Reputation: 4484
I'm using EasyPhp DevServer
with Apache 2.4.25
, PHP 5.6.30
, and PHP 7.1.3
installed.
For times, I usually switch between those two PHP versions, without changing any configuration element anywhere, and it works fine.
Now I just added PHP 8.1.2
, and when I switch to it I get the well known error message:
PHP Warning: PHP Startup: Unable to load dynamic library 'openssl' (tried: C:\Program Files (x86)\EasyPHP-Devserver-17\eds-binaries\php\php812vs16x86x230327010135\ext\php_openssl (Le module spécifié est introuvable), C:\Program Files (x86)\EasyPHP-Devserver-17\eds-binaries\php\php812vs16x86x230327010135\ext\php_php_openssl.dll (Le module spécifié est introuvable)) in Unknown on line 0
Obviously I read a lot of answers about that, but no one seem to be of help in my case, since the php.ini
for 8.1.2
includes the same needed specifications than the two other ones:
extension_dir = "C:\Program Files (x86)\EasyPHP-Devserver-17\eds-binaries\php\php812vs16x86x230327010135\ext"
, which is the correct path where resides php_openssl.dll
extension=openssl
, rather than extension=php_openssl.dll
for the older versions (but the error message says it did search for php_openssl.dll
)Also, despite of what is said in https://www.php.net/manual/en/openssl.installation.php
:
Note to Win32 Users
In order for this extension to work, there are DLL files that must be available to the Windows system PATH.
(...)
This extension requires the following files to be in the PATH: libeay32.dll, or, as of OpenSSL 1.1, libcrypto-*.dll
openssl
is correctly loaded by PHP 5.6.30
and PHP 7.1.3
although nor the DLL nor other cited files are present in the Windows system PATH.
So I remain stuck: what else can I try?
Upvotes: 0
Views: 1513
Reputation: 4484
Looking for as many different advices as possible, I found a page from RAD Studio
: https://docwiki.embarcadero.com/RADStudio/Sydney/en/OpenSSL
.
Only oriented to openssl
itself for any purpose, it gives precise information about how to install it on Windows.
So I tried following its recommandation, which was to include a copy of the libeay32.dll
and ssleay32.dll
dynamic library files to the file system, using the OpenSSL installer https://slproweb.com/products/Win32OpenSSL.html
to install OpenSSL 1.1.1t Light
.
And now PHP 8.1.2
works fine with openssl
enabled, and without any other change or addon!
I can't figure out why these libraries are necessary for PHP 8.1.2
when the older versions worked without them, especially since they are not exactly the ones cited by the PHP manual page https://www.php.net/manual/en/openssl.installation.php
.
Upvotes: 1