logo
Apache Lounge
Webmasters

 


About

Forum Index Downloads Search Register Log in  RSS Apache Lounge
 


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

Apache Lounge is not sponsored.

Your donations will help to keep this site alive and well, and continuing building binaries.



Apache 2.4.37 + PHP + LDAPS => AppCrash
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Apache Forum Index -> Apache



View previous topic :: View next topic  
Author Message
Kagome



Joined: 20 Jul 2012
Posts: 8

PostPosted: Mon 03 Dec '18 21:44    Post subject: Apache 2.4.37 + PHP + LDAPS => AppCrash Reply with quote

Good evening.

I have with the current Version of Apache 2.4.37 (downloaded 30 Novembre 2018) a problem while connecting with a PHP Script to a Domaincontroller via LDAPS connection.

The Apache Server simple crashes.

Setup:
- Hostserver: Windows 2k12 Server (production) or Windows 10 (development)
- The Apache 2.4.37 x64 Version from this website
- PHP 7.2.12 x64 Threadsafe from windows.php.net
- DC: Microsoft 2k12 Domain Controller

The exactly same script and PHP Version works with Apache 2.4.34 on development and production system

- latest VC++ Redist. is installed

I get in the Event Message the folowing code: (sorry german operation system :/ )

See https://apaste.info/7Yht

In the mentioned logfile is written:

See https://apaste.info/lmkS

Any Ideas?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 6628
Location: Germany, Next to Hamburg

PostPosted: Mon 10 Dec '18 11:59    Post subject: Reply with quote

In your php.ini set

Code:

log_errors = On
display_startup_errors = On
error_log = C:\php_errors.log


You it will be logged what causes that issue.

Quote:
I get in the Event Message the folowing code: (sorry german operation system :/ )


No Problem Very Happy I can read it.

libcrypto belongs to OpenSSL. It might be the issue that php loads different part of OpenSSL since you run php as module and apache might has a different version (There are OpenSSL files in apache\bin folder and also in the php folder). In my setup there is C:\php72\libcrypto-1_1-x64.dll and C:\Users\james\apache24\bin\libcrypto-1_1-x64.dll

It is recommended to separate PHP from the apache process using fcgid. See https://www.apachelounge.com/viewtopic.php?t=2394

If you still have a question please ask again.
Back to top
TNe-ALf



Joined: 23 Apr 2012
Posts: 7

PostPosted: Fri 04 Jan '19 17:37    Post subject: Reply with quote

Hello,

i have same problem.
i test a hole day to find the problem, but no success
only php 7.1.25 working.

try php as modul or via mod_fcgid

modul error.log diffrent versions
https://apaste.info/u8ir

Apache 2.4.37 x64 VC15 OpenSSL 1.1.1.a PHP 7.1.25 VC14 OpenSSL/1.0.2q -- Working --
Apache 2.4.37 x64 VC14 OpenSSL 1.0.2q PHP 7.2.13 VC15 OpenSSL/1.1.1a -- NOT Working --
Apache 2.4.37 x64 VC15 OpenSSL 1.1.1.a PHP 7.3.0 VC15 OpenSSL/1.1.1a -- NOT Working -

php_mod httpd crash
https://apaste.info/rSFl

mod_fcgid php-cgi.exe crash, but still stay in tasklist
https://apaste.info/KkUn

mod_fcgid error.log
https://apaste.info/0sJq

thinking is a OpenSSL problem, can anybody provide a php 7.3 SSL 1.0.2 version?

Hendrik
Back to top
Jan-E



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

PostPosted: Fri 04 Jan '19 18:13    Post subject: Reply with quote

TNe-ALf wrote:
<snip>
Apache 2.4.37 x64 VC15 OpenSSL 1.1.1.a PHP 7.1.25 VC14 OpenSSL/1.0.2q -- Working --
<snip>
thinking is a OpenSSL problem, can anybody provide a php 7.3 SSL 1.0.2 version?

The other way around: try PHP 7.1.25 with OpenSSL 1.1.1.
https://www.apachelounge.com/viewtopic.php?t=8182
If it is an OpenSSL issue, that one should crash.
Back to top
TNe-ALf



Joined: 23 Apr 2012
Posts: 7

PostPosted: Fri 04 Jan '19 19:08    Post subject: Reply with quote

Jan-E wrote:

If it is an OpenSSL issue, that one should crash.


Yes with 7.1.25-OpenSSL-1.1.1 crash

Hendrik
Back to top
Jan-E



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

PostPosted: Sat 05 Jan '19 7:54    Post subject: Reply with quote

Oops. To separate the issue from Apache: does it crash as well when you load php-7.1.25-OpenSSL-1.1.1-nts-Win32-VC14-x64 or php-7.1.25-OpenSSL-1.1.1-Win32-VC14-x64 as mod_fcgid?

I have informed the Windows expert of the PHP core developers about this. Maybe he will reply here as the Apachelounge user Weltling.

In the mean time: in your mod_php crash report I saw that C:\Program Files\TortoiseSVN\bin\sasl*.dll files were loaded.
https://apaste.info/rSFl

The PHP LDAP extension supports SASL, so that is not illogical. Do you know which OpenSSL versions is being used in those TortoiseSVN DLL's?

To be on the safe side, it might be wise to put the right version of the sasl DLL's in your PHP-directory. Look in the sasl2 dir of libsasl-2.1.27-1-vc15-x64.zip at https://windows.php.net/downloads/php-sdk/deps/vc15/x64/
These dll's are dependent on libcrypto-1_1-x64.dll, so they are compiled with OpenSSL 1.1.x.

For the official PHP 7.1 builds: libsasl-2.1.25-vc14-x64.zip at https://windows.php.net/downloads/php-sdk/deps/vc14/x64/ (dependent on LIBEAY32.dll).
Back to top
wantedxnn



Joined: 07 Oct 2017
Posts: 5
Location: Romānia

PostPosted: Sat 05 Jan '19 16:49    Post subject: Reply with quote

Do you use xdebug extension on php? because i had this issue with crashing on load https and in htpp mode was working fine fixed by removing xdebug.


Apache Version Apache/2.4.37 (Win64) OpenSSL/1.1.1a PHP/7.3.0
Back to top
Jan-E



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

PostPosted: Sat 05 Jan '19 17:00    Post subject: Reply with quote

In his crashreports you can see that php_xdebug.dll is loaded.
Back to top
wantedxnn



Joined: 07 Oct 2017
Posts: 5
Location: Romānia

PostPosted: Sat 05 Jan '19 17:27    Post subject: Reply with quote

Jan-E wrote:
In his crashreports you can see that php_xdebug.dll is loaded.


My php load fine xdebug but look what i get if i try to access https/ssl conection

https://www.hastebin.com/igatucicer.cs

Just keep crashing. And in php log is empty nothing going wrong... first time i supposed also is ssl version issue.
Back to top
Jan-E



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

PostPosted: Sat 05 Jan '19 20:45    Post subject: Reply with quote

wantedxnn wrote:

My php load fine xdebug but look what i get if i try to access https/ssl conection

https://www.hastebin.com/igatucicer.cs

Just keep crashing. And in php log is empty nothing going wrong... first time i supposed also is ssl version issue.

What is unusual in the apache log?

At first glance I see no problems. mod_md.so is working fine in my VC15 OpenSSL 1.1.1a x64 development env (had an automatic renewal yesterday), so that must be something in your setup.
Back to top
wantedxnn



Joined: 07 Oct 2017
Posts: 5
Location: Romānia

PostPosted: Sat 05 Jan '19 23:01    Post subject: Reply with quote

Jan-E wrote:
What is unusual in the apache log?

At first glance I see no problems. mod_md.so is working fine in my VC15 OpenSSL 1.1.1a x64 development env (had an automatic renewal yesterday), so that must be something in your setup.


Lol i know but apache or php don't report any error just keeping restart service if xdebug is enabled and you try to access https\ssl.
Back to top
Jan-E



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

PostPosted: Sun 06 Jan '19 1:32    Post subject: Reply with quote

TNe-ALf wrote:
thinking is a OpenSSL problem, can anybody provide a php 7.3 SSL 1.0.2 version?

Try this as mod_fcgid:
https://phpdev.toolsforresearch.com/php-7.3.1RC1-OpenSSL-1.0.2-nts-Win32-VC15-x64.htm
https://phpdev.toolsforresearch.com/php-7.3.1RC1-OpenSSL-1.0.2-nts-Win32-VC15-x64.zip
Back to top
TNe-ALf



Joined: 23 Apr 2012
Posts: 7

PostPosted: Mon 07 Jan '19 12:19    Post subject: Reply with quote

Hi, thx for reply and files

Jan-E wrote:
Oops. To separate the issue from Apache: does it crash as well when you load php-7.1.25-OpenSSL-1.1.1-nts-Win32-VC14-x64 or php-7.1.25-OpenSSL-1.1.1-Win32-VC14-x64 as mod_fcgid?

httpd-mod_fcgid survived + internal error 500 page

Jan-E wrote:

Do you know which OpenSSL versions is being used in those TortoiseSVN DLL's?

No, in changelog i can't find last version, but is static

Jan-E wrote:

To be on the safe side, it might be wise to put the right version of the sasl DLL's in your PHP-directory

i do so, no change, OpenSSL 1.1.1a will crash

wantedxnn wrote:

Do you use xdebug extension on php?

Yes, but no changes with disabled xdebug


Tank you Jan-E for "PHP 7.3.1RC1_OpenSSL-1.0.2"
PHP 7.3.1RC1_OpenSSL-1.0.2 is working fine, no Crash in sldap
(You have an TS version also?)

hopefully can find someone the problem with OpenSSL 1.1.1

Hendrik
Back to top
Jan-E



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

PostPosted: Mon 07 Jan '19 21:43    Post subject: Reply with quote

Strange. I ran the tests on the Ldap extension and that did not make any difference between OpenSSL 1.0.2 and OpenSSL 1.1.1. can you paste your php.ini somewhere, so I can try to run the tests with those settings?
Back to top
TNe-ALf



Joined: 23 Apr 2012
Posts: 7

PostPosted: Tue 08 Jan '19 15:42    Post subject: Reply with quote

php.ini
https://apaste.info/A1NO

ldap class
https://apaste.info/7Vsc

test php
https://apaste.info/bioG

Hendrik
Back to top
Jan-E



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

PostPosted: Wed 09 Jan '19 16:33    Post subject: Reply with quote

Try this as mod_fcgid:
https://phpdev.toolsforresearch.com/php-7.1.26-OpenSSL-1.1.1-nts-Win32-VC14-x64.htm
https://phpdev.toolsforresearch.com/php-7.1.26-OpenSSL-1.1.1-nts-Win32-VC14-x64.zip

I have updated OpenLDAP to 2.4.47 (was 2.4.44 or 2.4.45).
Back to top
TNe-ALf



Joined: 23 Apr 2012
Posts: 7

PostPosted: Wed 09 Jan '19 17:40    Post subject: Reply with quote

Jan-E wrote:
Try this ...
I have updated OpenLDAP to 2.4.47 (was 2.4.44 or 2.4.45).


Yes, working fine!!! No Crash


>Fixed libldap OpenSSL 1.1.1 compatibility with BIO_method (ITS#8791)
>changelog 2.4.46
in BIO_method was crashed
>TLS: can't connect: error:20080078:BIO routines:bio_write_intern:uninitialized.
You mean, OpenLDAP 2.4.44 or 2.4.45 was the Problem?

Hendrik
Back to top
Jan-E



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

PostPosted: Wed 09 Jan '19 18:09    Post subject: Reply with quote

The first mention of OpenSSL 1.1.x in the changelog of OpenLDAP is in version 2.4.45. Support for ldaps in PHP is fairly new. I ran into a test that did not even mention support for ldaps.

I asked the PHP Windows devs to update OpenLDAP:
https://github.com/winlibs/openldap/issues/4
Back to top
TNe-ALf



Joined: 23 Apr 2012
Posts: 7

PostPosted: Wed 09 Jan '19 18:30    Post subject: Reply with quote

Many thx Jan-E

Hendrik
Back to top
Jan-E



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

PostPosted: Thu 10 Jan '19 2:31    Post subject: Reply with quote

All of my builds with OpenSSL 1.1.1 are upgraded to OpenLDAP 2.4.47 now (7.3, 7.2 and the special build of 7.1): https://www.apachelounge.com/viewtopic.php?t=6359

Probably the next versions of the official PHP.net distributions will be upgraded as well. PHP 7.3.2 and PHP 7.2.15 will be released on February 9, 2019.
Back to top


Post new topic   Reply to topic    Apache Forum Index -> Apache Goto page 1, 2  Next
Page 1 of 2