Author |
|
AndreL
Joined: 23 Sep 2009 Posts: 5
|
Posted: Tue 01 Mar '16 19:34 Post subject: OpenSSL 1.0.2g VC14 : Unable to load ./ext/php_openssl.dll |
|
|
Hi,
Running httpd 2.4.18 version Februari 2016 Updated with OpenSSL 1.0.2f with PHP 5.6.18 : OK, no issue
But with the latest VC14 OpenSSL 1.0.2g version, I got the following error:
PHP Startup: Unable to load dynamic library './ext/php_openssl.dll'
NB. I'm using Apache and PHP WIN32 version
Thanks for your,
André. |
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3092 Location: Hilversum, NL, EU
|
Posted: Tue 01 Mar '16 20:39 Post subject: |
|
|
With 1.0.2f Apache and PHP both VC11 ?
More info in the Windows Event Viewer and/or PHP log and Apache log ?
Now you are mixing Apache VC14 and PHP VC11. |
|
Back to top |
|
AndreL
Joined: 23 Sep 2009 Posts: 5
|
Posted: Tue 01 Mar '16 22:30 Post subject: |
|
|
Hi,
Indeed only PHP 7 is available in version VC14 but was not issue. Not tested yes the application compatibility with this latest version.
HTTPS Apache VC14 OpenSSL 1.0.2g with Php applications without direct call to OpenSSL are running fines but issue if PHP apps is using openSSL.
- No error in apache log file.
- Windows 10 application log:
php[7728]
PHP Warning: PHP Startup: Unable to load dynamic library './ext\php_openssl.dll' - Le système d’exploitation ne peut pas exécuter %1. (C:\Web\Apache2\bin\httpd.exe -d C:/Web/Apache2)
Thanks for your help,
André. |
|
Back to top |
|
buckskin
Joined: 01 Mar 2016 Posts: 5 Location: Madison, WI
|
Posted: Tue 01 Mar '16 23:54 Post subject: |
|
|
Same issue here. I've just tried upgrading to the latest httpd-2.4.18-win32-VC14 with ssl102g (from httpd-2.4.18-win32-VC14 with ssl102e) and am getting the 'Unable to load dynamic library 'ext\php_openssl.dll' - The operating system cannot run %1' startup message in PHP error log. I'm running on Windows server 2008 R2 with PHP 5.6.18. I see libeay32.dll and ssleay32.dll are in /bin where they have been all along, so not sure what might be causing it. |
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3092 Location: Hilversum, NL, EU
|
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3092 Location: Hilversum, NL, EU
|
Posted: Wed 02 Mar '16 11:07 Post subject: |
|
|
Reply from the PHP Team:
From what I see in the thread, in both cases the extension_dir directive in
php.ini has to contain an absolute path. It is a very common mistake in the
ini files, that causes these reports.
I was preparing the new OpenSSL builds yesterday, neither vc11 nor
vc14 have any issues with PHP. |
|
Back to top |
|
Jan-E
Joined: 09 Mar 2012 Posts: 1266 Location: Amsterdam, NL, EU
|
Posted: Wed 02 Mar '16 11:12 Post subject: |
|
|
Probably there are some conflicts between the OpenSSL in apache\bin (1.0.2g) and the OpenSSL in the PHP-dir (1.0.1r).
Problems like these are exactly the reason why I am using the same OpenSSL version in my PHP builds. That is OpenSSL 1.0.2g now with OpenSSL FIPS 2.0.12. If you do not use SSLFips on the Fips version works just like a normal OpenSSL 1.0.2g.
My builds:
https://www.apachelounge.com/viewtopic.php?t=6359 |
|
Back to top |
|
Jan-E
Joined: 09 Mar 2012 Posts: 1266 Location: Amsterdam, NL, EU
|
Posted: Wed 02 Mar '16 11:53 Post subject: |
|
|
Steffen wrote: | From what I see in the thread, in both cases the extension_dir directive in php.ini has to contain an absolute path. It is a very common mistake in the ini files, that causes these reports. |
I suppose the people with troubles did not change the php.ini. This raises the question: why did not they have troubles with Apache OpenSSL 1.0.2f? |
|
Back to top |
|
weltling
Joined: 25 Apr 2013 Posts: 6
|
Posted: Wed 02 Mar '16 15:43 Post subject: |
|
|
The httpd.exe binary correctly exports the OPENSSL_Applink shim. By a test, OpenSSL seems to load and work correctly. It is most likely an environment/config issue.
Thanks. |
|
Back to top |
|
weltling
Joined: 25 Apr 2013 Posts: 6
|
Posted: Wed 02 Mar '16 15:47 Post subject: Re: OpenSSL 1.0.2g VC14 : Unable to load ./ext/php_openssl.d |
|
|
AndreL wrote: | Hi,
Running httpd 2.4.18 version Februari 2016 Updated with OpenSSL 1.0.2f with PHP 5.6.18 : OK, no issue
But with the latest VC14 OpenSSL 1.0.2g version, I got the following error:
|
If you use the builds from windows.php.net, the PHP5 builds are made with VC11 and linked with OpenSSL 1.0.1. While loading DLL from a higher OpenSSL version is supposed to work, using Apache built with another CRT is still a no go. You should either fetch the VC11 Apache builds than have now OpenSSL 1.0.2g. Or, if you have to use VC14 builds, please fetch PHP7 that are built with the same CRT.
Thanks. |
|
Back to top |
|
buckskin
Joined: 01 Mar 2016 Posts: 5 Location: Madison, WI
|
|
Back to top |
|
Jan-E
Joined: 09 Mar 2012 Posts: 1266 Location: Amsterdam, NL, EU
|
Posted: Wed 02 Mar '16 17:24 Post subject: |
|
|
Try to use as much of the official extensions as possible. For instance: use your current php_sqlsrv.dll and php_pdo_sqlsrv.dll |
|
Back to top |
|
weltling
Joined: 25 Apr 2013 Posts: 6
|
Posted: Wed 02 Mar '16 18:56 Post subject: |
|
|
I've re-read your post - so you was first using a vc14 Apache build with vc11 PHP build, like AndreL. Now that you've fetched a vc11 one, it matches the PHP CRT.
Thanks |
|
Back to top |
|
Jan-E
Joined: 09 Mar 2012 Posts: 1266 Location: Amsterdam, NL, EU
|
Posted: Wed 02 Mar '16 19:08 Post subject: |
|
|
As far as I can see he did not switch CRT: Quote: | I've just tried upgrading to the latest httpd-2.4.18-win32-VC14 with ssl102g (from httpd-2.4.18-win32-VC14 with ssl102e) |
But only buckskin can tell for sure. |
|
Back to top |
|
buckskin
Joined: 01 Mar 2016 Posts: 5 Location: Madison, WI
|
Posted: Wed 02 Mar '16 19:22 Post subject: |
|
|
If I understand the question correctly:
No ...
I was running OK:
httpd-2.4.18-win32-VC14 with ssl102e
with 'standard' php-5.6.18-Win32-VC11-x86
I upgraded to
httpd-2.4.18-win32-VC14 with ssl102g
and got error.
I then upgraded to Jan-E's php-5.6.18-Win32-VC11-x86
and it is working. |
|
Back to top |
|
weltling
Joined: 25 Apr 2013 Posts: 6
|
Posted: Wed 02 Mar '16 19:24 Post subject: |
|
|
Jan-E wrote: | As far as I can see he did not switch CRT: Quote: | I've just tried upgrading to the latest httpd-2.4.18-win32-VC14 with ssl102g (from httpd-2.4.18-win32-VC14 with ssl102e) |
But only buckskin can tell for sure. |
Doh, in buckskin's first post 5.6.18 is mentioned. I've overseen early today. From what I see, it still looks like config/environment issue. Two suspicious things in both reports are
- using vc14 Apache with vc11 PHP
- using relative path in the ini
These kind of mistake is done very often and leads to false positive reports on bugs.php.net as well. Any other factors come into game like forgotten global paths to older PHP, other programs suddenly injecting their paths globally, any other possible DLL hell.
The upward OpenSSL compatibility is a sure thing as OpenSSL promises. But, despite the promise, I wouldn't try to mix CRT. Because - PHP has many other things that can be broken. There are VC11 builds Steffen provides, and they fit perfectly and should be used with PHP5. Mixing CRT was always an issue, even more before we've got to know about the APPLINK technology.
Thanks. |
|
Back to top |
|
mikeatutsw
Joined: 15 Oct 2015 Posts: 5 Location: Dallas
|
Posted: Wed 02 Mar '16 22:37 Post subject: |
|
|
So, I'm having the same issue. I'm not sure I understand what the resolution is here.
I've downloaded both Apache and PHP today, and the associated VC redists from the same sites listed below. If I use the 2.4.17 version the error goes away.
Event log error:
PHP Warning: PHP Startup: Unable to load dynamic library 'D:\Program Files\PHP\ext\php_openssl.dll' - The operating system cannot run %1.
Apache & PHP Versions:
httpd-2.4.18-win32-VC14.zip
https://www.apachelounge.com/download/
PHP 5.6.18 VC11
http://windows.php.net/downloads/releases/php-5.6.18-Win32-VC11-x86.zip |
|
Back to top |
|
buckskin
Joined: 01 Mar 2016 Posts: 5 Location: Madison, WI
|
Posted: Wed 02 Mar '16 23:01 Post subject: |
|
|
I backed off and tried:
httpd-2.4.18-win32-VC11 with ssl102g
with 'standard' php-5.6.18-Win32-VC11-x86
and get same error. So, that blows the incompatible VC version theory.
I will try updating to Jan-E's PHP when I have a little time, but I bet it will work.
EDIT:
OK ... I took the time and yes:
upgraded to Jan-E's php-5.6.18-Win32-VC11-x86
and it is working.
So in Summary:
Full path in php.ini makes no difference.
httpd-2.4.18-win32-VC14 with ssl102e with 'standard' php-5.6.18-Win32-VC11-x86 Works
httpd-2.4.18-win32-VC14 with ssl102g with 'standard' php-5.6.18-Win32-VC11-x86 Fails
httpd-2.4.18-win32-VC14 with ssl102g with 'Jan-E' php-5.6.18-Win32-VC11-x86 Works
httpd-2.4.18-win32-VC11 with ssl102g with 'standard' php-5.6.18-Win32-VC11-x86 Fails
httpd-2.4.18-win32-VC11 with ssl102g with 'Jan-E' php-5.6.18-Win32-VC11-x86 Works |
|
Back to top |
|
Jan-E
Joined: 09 Mar 2012 Posts: 1266 Location: Amsterdam, NL, EU
|
Posted: Thu 03 Mar '16 10:35 Post subject: |
|
|
Try it with the PHP 5.6.19 VC11 x86 Thread Safe version, that can be downloaded from http://windows.php.net/download/ now. Maybe it makes a difference with its predecessor. |
|
Back to top |
|
weltling
Joined: 25 Apr 2013 Posts: 6
|
Posted: Thu 03 Mar '16 12:31 Post subject: |
|
|
Thanks for the effort, @buckskin. I went for investigation and here is the sum up - the latest OpenSSL releases broke binary compatibility on the default builds. Additional configuration options are needed to keep the symbols.
This is related to the security mitigations as per http://openssl.org/news/secadv/20160301.txt , so per se not an issue between 1.0.2 and 1.0.1 using APPLINK. Same breakage will happen to the preceding minor OpenSSL versions. PHP 5.6.19 is going to be released soon and should be fine with this.
Please note that the previous notes about absolute path and same CRT are still useful. This helps to avoid common issues and saves time on investigations.
Thanks. |
|
Back to top |
|