diff options
| author | Ryan Bloom <rbb@php.net> | 2001-08-17 22:25:13 +0000 |
|---|---|---|
| committer | Ryan Bloom <rbb@php.net> | 2001-08-17 22:25:13 +0000 |
| commit | 1543904d71ed791999147599c6e244df646a9ff4 (patch) | |
| tree | 8e404fed3d60bbc3b954d0c262c64c1878867a44 /sapi/apache2filter | |
| parent | ea315a2e70fbefa3caa831a052e8718aa7f5c62f (diff) | |
| download | php-git-1543904d71ed791999147599c6e244df646a9ff4.tar.gz | |
Fix a seg fault in PHP. If a child process is created in the server,
using apr_proc_create, it will seg fault, because PHP is using a NULL
child cleanup. To fix this, we have to use the special cleanup function,
apr_pool_cleanup_null.
This also fixes a compiler warning in the ap_log_error call.
Diffstat (limited to 'sapi/apache2filter')
| -rw-r--r-- | sapi/apache2filter/apache_config.c | 2 | ||||
| -rw-r--r-- | sapi/apache2filter/sapi_apache2.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sapi/apache2filter/apache_config.c b/sapi/apache2filter/apache_config.c index 2b0ce50c7e..a70f926996 100644 --- a/sapi/apache2filter/apache_config.c +++ b/sapi/apache2filter/apache_config.c @@ -150,7 +150,7 @@ void *create_php_config(apr_pool_t *p, char *dummy) phpapdebug((stderr, "Creating new config (%p) for %s\n", newx, dummy)); zend_hash_init(&newx->config, 0, NULL, NULL, 1); - apr_pool_cleanup_register(p, newx, destroy_php_config, NULL); + apr_pool_cleanup_register(p, newx, destroy_php_config, apr_pool_cleanup_null); return (void *) newx; } diff --git a/sapi/apache2filter/sapi_apache2.c b/sapi/apache2filter/sapi_apache2.c index 5a57ab1122..d50c078417 100644 --- a/sapi/apache2filter/sapi_apache2.c +++ b/sapi/apache2filter/sapi_apache2.c @@ -188,7 +188,7 @@ static void php_apache_sapi_log_message(char *msg) * line. Not sure if this is correct, but it mirrors what happens * with Apache 1.3 -- rbb */ - ap_log_error(NULL, APLOG_ERR | APLOG_NOERRNO | APLOG_STARTUP, 0, ctx->f->r->server, "%s", msg); + ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO | APLOG_STARTUP, 0, ctx->f->r->server, "%s", msg); } static sapi_module_struct apache2_sapi_module = { @@ -402,7 +402,7 @@ php_apache_server_startup(apr_pool_t *pchild, server_rec *s) tsrm_startup(1, 1, 0, NULL); sapi_startup(&apache2_sapi_module); apache2_sapi_module.startup(&apache2_sapi_module); - apr_pool_cleanup_register(pchild, NULL, php_apache_server_shutdown, NULL); + apr_pool_cleanup_register(pchild, NULL, php_apache_server_shutdown, apr_pool_cleanup_null); php_apache_register_module(); } |
