From a0ecb3794f00e65cd2a073b2073e32d6c2fb7180 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 27 Jun 2014 09:45:53 +0200 Subject: [PATCH 1/5] Fix Bug #67530 error_log=syslog ignored As for Bug #64915 Systemd use --nodaemonize but need to error_log to file or syslog to be honoured --- sapi/fpm/fpm/fpm_stdio.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sapi/fpm/fpm/fpm_stdio.c b/sapi/fpm/fpm/fpm_stdio.c index d81e10150db..769d3a6338c 100644 --- a/sapi/fpm/fpm/fpm_stdio.c +++ b/sapi/fpm/fpm/fpm_stdio.c @@ -268,7 +268,11 @@ int fpm_stdio_open_error_log(int reopen) /* {{{ */ if (!strcasecmp(fpm_global_config.error_log, "syslog")) { openlog(fpm_global_config.syslog_ident, LOG_PID | LOG_CONS, fpm_global_config.syslog_facility); fpm_globals.error_log_fd = ZLOG_SYSLOG; +#if HAVE_UNISTD_H + if (fpm_global_config.daemonize || (!isatty(STDERR_FILENO) && !fpm_globals.force_stderr)) { +#else if (fpm_global_config.daemonize) { +#endif zlog_set_fd(fpm_globals.error_log_fd); } return 0; From bf328b16817a9d7dfc7aaf078d4e944ab14ce0e1 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 27 Jun 2014 09:47:28 +0200 Subject: [PATCH 2/5] Fix Bug #67531 syslog cannot be set in pool configuration error_log is listed in FPM_PHP_INI_TO_EXPAND, but should not be expand when value = syslog --- sapi/fpm/fpm/fpm_conf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sapi/fpm/fpm/fpm_conf.c b/sapi/fpm/fpm/fpm_conf.c index 688c6402505..103a830389c 100644 --- a/sapi/fpm/fpm/fpm_conf.c +++ b/sapi/fpm/fpm/fpm_conf.c @@ -1069,6 +1069,9 @@ static int fpm_conf_process_all_pools() /* {{{ */ } } for (kv = wp->config->php_admin_values; kv; kv = kv->next) { + if (!strcasecmp(kv->key, "error_log") && !strcasecmp(kv->value, "syslog")) { + continue; + } for (p = options; *p; p++) { if (!strcasecmp(kv->key, *p)) { fpm_evaluate_full_path(&kv->value, wp, NULL, 0); From 334758794da5fc38a5fb9cf2c962eb535bab6b67 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 27 Jun 2014 09:50:01 +0200 Subject: [PATCH 3/5] NEWS --- NEWS | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NEWS b/NEWS index 7ddee6a2526..7463305219d 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,10 @@ PHP NEWS . Implemented FR #67429 (CLI server is missing some new HTTP response codes). (Adam) +- FPM: + . Fix bug #67530 (error_log=syslog ignored). (Remi) + . Fix bug #67531 (syslog cannot be set in pool configuration). (Remi) + - Streams: . Fixed bug #67430 (http:// wrapper doesn't follow 308 redirects). (Adam) From 6c72ea87fd5c1155f31bea75c1711e0143bb6447 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 27 Jun 2014 09:50:43 +0200 Subject: [PATCH 4/5] NEWS --- NEWS | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NEWS b/NEWS index fce2198a7ab..27dfca41f72 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,10 @@ PHP NEWS . Implemented FR #67429 (CLI server is missing some new HTTP response codes). (Adam) +- FPM: + . Fix bug #67530 (error_log=syslog ignored). (Remi) + . Fix bug #67531 (syslog cannot be set in pool configuration). (Remi) + - Streams: . Fixed bug #67430 (http:// wrapper doesn't follow 308 redirects). (Adam) From f201d061ba0d41344667527b64bbfefbcc67d5e5 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 27 Jun 2014 09:51:34 +0200 Subject: [PATCH 5/5] NEWS --- NEWS | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NEWS b/NEWS index 373f8108816..0fdf0555d83 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,10 @@ PHP NEWS . Fixed bug #67468 (Segfault in highlight_file()/highlight_string()). (Andreas Ferber) +- FPM: + . Fix bug #67530 (error_log=syslog ignored). (Remi) + . Fix bug #67531 (syslog cannot be set in pool configuration). (Remi) + - phpdbg: . Fix Bug #67499 (readline feature not enabled when build with libedit). (Remi)