Xampp 1.8.1 Win - PHP extention OpenSSL is broken

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Xampp 1.8.1 Win - PHP extention OpenSSL is broken

Postby ad2019 » 11. October 2012 08:36

After many tries, I had no success making PHP OpenSSL extension work with Apache 2.4.3 implementation on Xampp 1.8.1 Windows

When PHP is executed in Apache context, OpenSSL extension uses Apache OpenSLL dlls located at:
- apache/bin/libeay32.dll (1.0.1c)
- apache/bin/ssleay32.dll (1.0.1c)

instead of bundled PHP version located at:
- php/libeay32.dll (0.9.8x)
- php/ssleay32.dll (0.9.8x)

=> When calling a PHP openssl function like 'openssl_public_encrypt' gives an Apache APPCRASH:

Problem signature:
   Problem Event Name: APPCRASH
   Application Name: httpd.exe
   Application Version: 2.4.3.0
   Application Timestamp: 502f70a3
   Fault Module Name: libeay32.dll
   Default module version: 1.0.1.3
   Module Timestamp default 4faf8edb
   Exception Code: c0000005
   Exception Offset: 000403fb
   OS Version: 6.1.7601.2.1.0.256.1
   Locale ID: 1036
   Additional Information 1: 0a9e
   Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
   Additional Information 3: 0a9e
   Additional Information 4: 0a9e372d3b4ad19135b953a78882e789

I tried replacing Apache dlls by PHP dlls: KO (Apache won't start)
I tried replacing PHP dlls by Apache dlls: KO (Apache crash)

Now, if you need the PHP OpenSSL function for your projects, you have to:
- disable Apache SSL module in 'apache/conf/httpd.conf' (#LoadModule ssl_module modules/mod_ssl.so)
- AND rename/remove the following dlls to disable them and force php to use its bundled ones:
- apache/bin/libeay32.dll
- apache/bin/ssleay32.dll
But this remove SSL support in Apache and could have other side effects for which i don't have any clue.

Note that on my previous version of Xampp (1.7.7), it was working like a charm. I guess that because Apache OpenSLL dlls and PHP OpenSLL versions were identical.

Hope it will be fixed on next Xampp version.

Regards.
ad2019
 
Posts: 2
Joined: 11. October 2012 07:53
Operating System: Win 7 x64 SP1

Re: Xampp 1.8.1 Win - PHP extention OpenSSL is broken

Postby ad2019 » 26. October 2012 09:34

Hi,

For those concerned, the workaround for this issue, is to downgrade Apache 2.4.3 OpenSSL version to 0.9.8x in order to make it work with PHP OpenSSL.

  • Go to http://www.apachehaus.com/cgi-bin/download.plx
  • Find OpenSSL Upgrade/Downgrades for Apache 2.4.x
  • Download OpenSSL 0.9.8x downgrade for Apache 2.4.3 (x86)
  • Stop Xampp Apache
  • Replace files in /apache directories as indicated in ZIP files
  • Re-enable apache mod_ssl.so only if you had previously disabled it
  • Test a PHP open_ssl function, it should run ok

Regards.
ad2019
 
Posts: 2
Joined: 11. October 2012 07:53
Operating System: Win 7 x64 SP1

Re: Xampp 1.8.1 Win - PHP extention OpenSSL is broken

Postby MizziPizzi » 19. December 2012 19:19

What do I do if I'm not interested in the php openssl functions but just want to create a CA so I don't get that annoying warning everytime i type https://mysite.com. Do I still have to downgrade? I've tried to run the commandline but all I get is a warning that it can't open the openssl.cnf file :s If someone could help me with this issue It would be greatly appreciated
MizziPizzi
 
Posts: 1
Joined: 19. December 2012 19:12
Operating System: windows 8


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 69 guests