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.