logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Other Software View previous topic :: View next topic
Reply to topic   Topic: OpenSSL 1.0.2g VC14 : Unable to load ./ext/php_openssl.dll Page 1, 2  Next
Author
AndreL



Joined: 23 Sep 2009
Posts: 5

PostPosted: Tue 01 Mar '16 19:34    Post subject: OpenSSL 1.0.2g VC14 : Unable to load ./ext/php_openssl.dll Reply with quote

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: 3049
Location: Hilversum, NL, EU

PostPosted: Tue 01 Mar '16 20:39    Post subject: Reply with quote

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

PostPosted: Tue 01 Mar '16 22:30    Post subject: Reply with quote

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

PostPosted: Tue 01 Mar '16 23:54    Post subject: Reply with quote

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: 3049
Location: Hilversum, NL, EU

PostPosted: Wed 02 Mar '16 11:02    Post subject: Reply with quote

What happens when you use the PHP 5.6.18 with 1.0.2g from Jan-E at https://www.apachelounge.com/viewtopic.php?p=32958#32958
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3049
Location: Hilversum, NL, EU

PostPosted: Wed 02 Mar '16 11:07    Post subject: Reply with quote

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: 1248
Location: Amsterdam, NL, EU

PostPosted: Wed 02 Mar '16 11:12    Post subject: Reply with quote

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: 1248
Location: Amsterdam, NL, EU

PostPosted: Wed 02 Mar '16 11:53    Post subject: Reply with quote

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

PostPosted: Wed 02 Mar '16 15:43    Post subject: Reply with quote

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

PostPosted: Wed 02 Mar '16 15:47    Post subject: Re: OpenSSL 1.0.2g VC14 : Unable to load ./ext/php_openssl.d Reply with quote

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

PostPosted: Wed 02 Mar '16 17:13    Post subject: Reply with quote

weltling:
Specifying full path in php.ini extension_dir did not help.
Can't use PHP7 yet as I need MSSQL support.

steffan & jan-e:
Yes: using jan-e https://phpdev.toolsforresearch.com/php-5.6.18-Win32-VC11-x86.zip seems to work fine.

Thanks
Back to top
Jan-E



Joined: 09 Mar 2012
Posts: 1248
Location: Amsterdam, NL, EU

PostPosted: Wed 02 Mar '16 17:24    Post subject: Reply with quote

buckskin wrote:
Yes: using jan-e https://phpdev.toolsforresearch.com/php-5.6.18-Win32-VC11-x86.zip seems to work fine.

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

PostPosted: Wed 02 Mar '16 18:56    Post subject: Reply with quote

buckskin wrote:
weltling:
Specifying full path in php.ini extension_dir did not help.
Can't use PHP7 yet as I need MSSQL support.

steffan & jan-e:
Yes: using jan-e https://phpdev.toolsforresearch.com/php-5.6.18-Win32-VC11-x86.zip seems to work fine.

Thanks


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: 1248
Location: Amsterdam, NL, EU

PostPosted: Wed 02 Mar '16 19:08    Post subject: Reply with quote

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

PostPosted: Wed 02 Mar '16 19:22    Post subject: Reply with quote

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

PostPosted: Wed 02 Mar '16 19:24    Post subject: Reply with quote

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

PostPosted: Wed 02 Mar '16 22:37    Post subject: Reply with quote

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

PostPosted: Wed 02 Mar '16 23:01    Post subject: Reply with quote

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: 1248
Location: Amsterdam, NL, EU

PostPosted: Thu 03 Mar '16 10:35    Post subject: Reply with quote

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

PostPosted: Thu 03 Mar '16 12:31    Post subject: Reply with quote

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


Reply to topic   Topic: OpenSSL 1.0.2g VC14 : Unable to load ./ext/php_openssl.dll View previous topic :: View next topic
Post new topic   Forum Index -> Other Software Page 1, 2  Next