Here is my modified php_init_handler from mod_php4.c

static void php_init_handler(server_rec *s, pool *p)
{
        fprintf(stderr,"mod_php4.c: php_init_handler: starting to run\n");
        register_cleanup(p, NULL, (void (*)(void
*))apache_php_module_shutdown_wrapper, (void (*)(void
*))php_module_shutdown_for_exec);
        if (!apache_php_initialized) {
                apache_php_initialized = 1;
#ifdef ZTS
                tsrm_startup(1, 1, 0, NULL);
#endif
                sapi_startup(&apache_sapi_module);
                php_apache_startup(&apache_sapi_module);
        }
#if MODULE_MAGIC_NUMBER >= 19980527
        {
                TSRMLS_FETCH();
                if (PG(expose_php)) {
                        ap_add_version_component("PHP/" PHP_VERSION);
                }
        }
#endif
        fprintf(stderr,"mod_php4.c: php_init_handler: all completed\n");
}

Should this print to stderr every time the init_handler is called regardless
of the value of apache_php_initialized?  Is there some other function that
is called by apache for initialization?

dave


-----Original Message-----
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 19, 2002 6:25 PM
To: David Viner
Cc: Php-Dev@lists. php. net
Subject: RE: [PHP-DEV] ini question


> I am sure that you are correct, Rasmus, and apache is calling it twice,
but
> what I don't understand is, why are the messages not identical?

Because we check for it?  Sorry, I didn't actually read through your code
examples, but I bet if you trace back you will find that the
apache_php_initialized check that we do is the cause of the different
output on the two calls.

-Rasmus



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

Reply via email to