summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRemi Collet <remi@php.net>2014-11-22 10:25:53 +0100
committerRemi Collet <remi@php.net>2014-11-22 10:35:51 +0100
commitc50ee655ea0c1ba4a1f6f7a6e37989100509d87c (patch)
treeaa3a834b1581176e4c8f1a202d816281daca29e4
parentbc55af0cf22aa419376b52fbd3f4c7310ab07d77 (diff)
downloadphp-git-c50ee655ea0c1ba4a1f6f7a6e37989100509d87c.tar.gz
Fixed Bug #68478 acess_log don't use prefix
Calling fpm_conf_process_all_pools before fpm_log_open allow to use fpm_evaluate_full_path and so to honor global prefix or pool prefix for access.log
-rw-r--r--sapi/fpm/fpm/fpm_conf.c6
-rw-r--r--sapi/fpm/fpm/fpm_log.c2
-rw-r--r--sapi/fpm/php-fpm.conf.in1
3 files changed, 6 insertions, 3 deletions
diff --git a/sapi/fpm/fpm/fpm_conf.c b/sapi/fpm/fpm/fpm_conf.c
index 908c7884a6..ceee2dd790 100644
--- a/sapi/fpm/fpm/fpm_conf.c
+++ b/sapi/fpm/fpm/fpm_conf.c
@@ -1194,15 +1194,15 @@ static int fpm_conf_post_process(int force_daemon TSRMLS_DC) /* {{{ */
return -1;
}
- if (0 > fpm_log_open(0)) {
+ if (0 > fpm_event_pre_init(fpm_global_config.events_mechanism)) {
return -1;
}
- if (0 > fpm_event_pre_init(fpm_global_config.events_mechanism)) {
+ if (0 > fpm_conf_process_all_pools()) {
return -1;
}
- if (0 > fpm_conf_process_all_pools()) {
+ if (0 > fpm_log_open(0)) {
return -1;
}
diff --git a/sapi/fpm/fpm/fpm_log.c b/sapi/fpm/fpm/fpm_log.c
index c71281b0b9..b0bf32ac16 100644
--- a/sapi/fpm/fpm/fpm_log.c
+++ b/sapi/fpm/fpm/fpm_log.c
@@ -46,6 +46,8 @@ int fpm_log_open(int reopen) /* {{{ */
if (0 > fd) {
zlog(ZLOG_SYSERROR, "failed to open access log (%s)", wp->config->access_log);
return -1;
+ } else {
+ zlog(ZLOG_DEBUG, "open access log (%s)", wp->config->access_log);
}
if (reopen) {
diff --git a/sapi/fpm/php-fpm.conf.in b/sapi/fpm/php-fpm.conf.in
index 2b1566047f..833a4f4f8c 100644
--- a/sapi/fpm/php-fpm.conf.in
+++ b/sapi/fpm/php-fpm.conf.in
@@ -131,6 +131,7 @@
; Per pool prefix
; It only applies on the following directives:
+; - 'access.log'
; - 'slowlog'
; - 'listen' (unixsocket)
; - 'chroot'