Hello Aaron,

if this fixes the problem, this patch should also go into PHP_4_2_0.

regards,
Derick

On Tue, 16 Apr 2002, Aaron Bannert wrote:

> On Tue, Apr 16, 2002 at 10:56:08AM +0200, Balazs Nagy wrote:
> > Excusez moi, I had a hard time in the last D&D3 session when I wrote
> > this.  Here's the dump:
> 
> Give the attached patch a try.
> 
> Looks like we're just trying to use the server_context before it's been
> initialized. (Thanks for Cliff for pointing this message out to me.)
> 
> -aaron
> 
> 
> Index: sapi_apache2.c
> ===================================================================
> RCS file: /repository/php4/sapi/apache2filter/sapi_apache2.c,v
> retrieving revision 1.61.2.9
> diff -u -u -r1.61.2.9 sapi_apache2.c
> --- sapi_apache2.c    12 Apr 2002 22:26:28 -0000      1.61.2.9
> +++ sapi_apache2.c    16 Apr 2002 22:49:53 -0000
> @@ -211,7 +211,14 @@
>        * line.  Not sure if this is correct, but it mirrors what happens
>        * with Apache 1.3 -- rbb
>        */
> -     ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO | APLOG_STARTUP, 0, 
>ctx->r->server, "%s", msg);
> +     if (ctx == NULL) { /* we haven't initialized our ctx yet, oh well */
> +             ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO | APLOG_STARTUP,
> +                                      0, NULL, "%s", msg);
> +     }
> +     else {
> +             ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO | APLOG_STARTUP,
> +                                      0, ctx->r->server, "%s", msg);
> +     }
>  }
>  
>  static sapi_module_struct apache2_sapi_module = {
> 
> -- 
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

-----------------------------------------------------------------------
                 Did I help you? Consider a gift:
      http://www.amazon.co.uk/exec/obidos/registry/SLCB276UZU8B
-----------------------------------------------------------------------
              PHP: Scripting the Web - [EMAIL PROTECTED]
                All your branches are belong to me!
            SRM: Script Running Machine - www.vl-srm.net
-----------------------------------------------------------------------


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to