perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Donovan <...@tomdonovan.net>
Subject Re: resend: Bug report re: Apache 2.2.6 on Windows
Date Tue, 18 Sep 2007 13:29:29 GMT
Michael Lackhoff wrote:
> On 23.12.37378 20:59 Tom Donovan wrote:
> 
>> 1. Problem Description:
>>
>>   perl-script handler fails with Apache 2.2.6 on Windows
>>   due to changes in stdin/stdout/stderr handles in mpm_winnt
>>
>>   Problem occurs with mod_perl 2.0.3 or with
>>      current (9/14/2007) SVN trunk.
> 
> I noticed the same problem with Apache 2.0.61.
> 
>>   This problem can be avoided if \server\mpm\winnt\mpm_winnt.c
>>   from Apache 2.2.4 is used - even with APR 1.2.11.
>>   Note that server\log.c line 411 also needs to be changed to
>>   work with this older mpm_winnt.
> 
> I would like to try this but since I am not a C programmer, can you say
> what the changed line in log.c should look like?
> And is there a similar fix for 2.0.61? I would prefer to stay with the
> 2.0.x branch for the time being.
> 
> - Michael

The change I made in 2.2.6 was to line 411 in server\log.c
--------------------------------------
CHANGED:

     rv = apr_file_dup2(stderr_log, s_main->error_log, stderr_p);

TO:

     if (stderr_log)
         rv = apr_file_dup2(stderr_log, s_main->error_log, stderr_p);
     else
         rv = apr_file_dup(&stderr_log, s_main->error_log, stderr_p);
--------------------------------------

Note the '&' character before 'stderr_log' in the call to apr_file_dup. 
  This differs from the call to apr_file_dup2, and it's easy to miss.

The line to change in server\log.c for version 2.0.61 is line 413.
You must also replace server\mpm\winnt\mpm_winnt.c with the one from 
Apache 2.0.59.  I haven't tried this with Apache 2.0 and AFAIK nobody 
else has, so please test carefully.

Also note that this reverses the changes which improved piped logging 
for 2.2.6 (2.0.61).

-tom-

Mime
View raw message