php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #66239
Patch fpm-syslog-bug.patch revision 2013-12-06 11:56 UTC by krakjoe@php.net
revision 2013-12-06 08:04 UTC by krakjoe@php.net
Patch fpm-syslog-bug-alternate.patch revision 2013-12-06 11:55 UTC by krakjoe@php.net

Patch fpm-syslog-bug-alternate.patch for FPM related Bug #66239

Patch version 2013-12-06 11:55 UTC

Return to Bug #66239 | Download this patch
Patch Revisions:

Developer: krakjoe@php.net

diff --git a/sapi/fpm/fpm/fpm_conf.c b/sapi/fpm/fpm/fpm_conf.c
index cd5fc34..395c309 100644
--- a/sapi/fpm/fpm/fpm_conf.c
+++ b/sapi/fpm/fpm/fpm_conf.c
@@ -711,7 +711,7 @@ static int fpm_evaluate_full_path(char **path, struct fpm_worker_pool_s *wp, cha
 			}
 		}
 	}
-
+	
 	if (*path) {
 		spprintf(&full_path, 0, "%s/%s", prefix, *path);
 		free(*path);
@@ -1055,11 +1055,17 @@ static int fpm_conf_process_all_pools() /* {{{ */
 
 		/* env[], php_value[], php_admin_values[] */
 		if (!wp->config->chroot) {
+#define is_syslog(e) \
+	((strncasecmp(e->key, "error_log", sizeof("error_log")) == SUCCESS) && \
+	(strncasecmp(e->value, "syslog", sizeof("syslog")) == SUCCESS))
+
 			struct key_value_s *kv;
 			char *options[] = FPM_PHP_INI_TO_EXPAND;
 			char **p;
 
 			for (kv = wp->config->php_values; kv; kv = kv->next) {
+				if (is_syslog(kv))
+					continue;
 				for (p = options; *p; p++) {
 					if (!strcasecmp(kv->key, *p)) {
 						fpm_evaluate_full_path(&kv->value, wp, NULL, 0);
@@ -1067,6 +1073,8 @@ static int fpm_conf_process_all_pools() /* {{{ */
 				}
 			}
 			for (kv = wp->config->php_admin_values; kv; kv = kv->next) {
+				if (is_syslog(kv))
+					continue;
 				for (p = options; *p; p++) {
 					if (!strcasecmp(kv->key, *p)) {
 						fpm_evaluate_full_path(&kv->value, wp, NULL, 0);
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 17:01:58 2024 UTC