perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philippe M. Chiasson" <go...@ectoplasm.org>
Subject Re: [mp2] callback returning bogus error code don't log the error
Date Sat, 11 Dec 2004 03:39:04 GMT
Stas Bekman wrote:
> Philippe M. Chiasson wrote:
> 
>> Stas Bekman wrote:
>>
>>> Stas Bekman wrote:
>>>
>>>> [...] This brings us to a more painful problem. the code in startup.pl:
>>>>
>>>>   $s->push_handlers(PerlPostConfigHandler => sub { 12345 });
>>>>
>>>> won't let the server start, and no error is logged, the server just
>>>> quits.
>>
>> Actually, you'll get this in the error_log:
>>
>> Configuration Failed
>>
>> it's from [httpd]/server/main.c:
>>
>>    if ( ap_run_open_logs(pconf, plog, ptemp, server_conf) != OK) {
>>        ap_log_error(APLOG_MARK, APLOG_STARTUP |APLOG_ERR,
>>                     0, NULL, "Unable to open logs\n");
>>        destroy_and_exit_process(process, 1);
>>    }
>>
>>    if ( ap_run_post_config(pconf, plog, ptemp, server_conf) != OK) {
>>        ap_log_error(APLOG_MARK, APLOG_STARTUP |APLOG_ERR, 0,
>>                     NULL, "Configuration Failed\n");
>>        destroy_and_exit_process(process, 1);
>>    }
>>
>>
>>> but this is a problem. I can't figure out why the server fails (won't 
>>> start here). I think for post_config phase it absolutely wants a 
>>> valid OK or another return code. Philippe, please take a look at the 
>>> apache source code. I think the answer will be there.
>>
>> See above!
> 
> But it gives no clue whatsoever where did it fail.

It does report "Configuration Failed" in error_log.
 
> I think we need to make a special case for open_logs and post_config 
> phases in modperl_callback and require OK or log a proper error.

Oh, like say something like "mod_perl handler XXX returned DDD at httpd.conf:44, server aborting"
kinda thing ?

-- 
--------------------------------------------------------------------------------
Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5 
http://gozer.ectoplasm.org/     F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5

Mime
View raw message