You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Dean Gaudet <dg...@arctic.org> on 1997/03/15 21:39:13 UTC

[PATCH] Re: [BUG?] vhost error log not set when creater_server_config() called

I'd call this a bug.  Try the patch included. 

Dean

On Fri, 14 Mar 1997, Rodent of Unusual Size wrote:

>     For a <VirtualHost> block, modules' create_server_config() callbacks
>     are apparently invoked before the vserver's error log has been set
>     up.
> 
>     I encountered this when trying to use log_printf() from within my
>     create_server_config() routine.  It works for the default server,
>     but when it was trying to log an "error" when configuring for the
>     vhost, it SEGVed in fprintf(s->error_log) because that cell wasn't
>     set up [yet].  It's not even set to stderr - it's just NULL.
> 
>     This happenes even if I list an explicit ErrorLog directive in the
>     <VirtualHost> block before the directive that triggered my
>     create_server_config() callback.
> 
>     This seems like a bug to me - I should think s->error_log should be
>     at least set to stderr (or preferably s_main->error_log) before any
>     modules are invoked - but it might just be that I'm missing
>     something.  Or that this is by design.
> 
>     Would someone please be kind enough to sanity-check me on this?
> 
>     #ken    :-P}
>