This has the potential for breaking existing configs by forcing the admin to
remove some ignored directives they've coded in a vhost.
The affected directives are BusyScanInterval, DefaultMaxClassProcessCount,
DefaultMinProcessCount, ErrorScanInterval, IdleScanInterval, IdleTimeout,
MaxProcessCount, PHP_Fix_Pathinfo_Enable, ProcessLifetime, SharedmemPath,
SocketPath, SpawnScore, SpawnScoreUpLimit, TerminationScore, TimeScore, and
ZombieScanInterval.
I suppose that a couple of these might have seemed to the administrator to
be more flexible than global-only, though it wouldn't have changed the
behavior when they added any of these to a vhost.
Please object now if you want to allow affected existing configurations to
continue to work. We can probably change the hard failure to a warning.
(A case where I might want to issue a warning for an ignored directive is
with IPCConnectTimeout on Unix; it is ignored there, but it has entered the
web wisdom as something that can help certain problems regardless of
platform. But that is independent of this patch.)
Index: fcgid_conf.c
===
--- fcgid_conf.c(revision 815491)
+++ fcgid_conf.c(working copy)
@@ -161,6 +161,12 @@
server_rec *s = cmd->server;
fcgid_server_conf *config =
ap_get_module_config(s->module_config, &fcgid_module);
+const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
+
+if (err != NULL) {
+return err;
+}
+
config->idle_timeout = atol(arg);
return NULL;
}
@@ -178,6 +184,12 @@
server_rec *s = cmd->server;
fcgid_server_conf *config =
ap_get_module_config(s->module_config, &fcgid_module);
+const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
+
+if (err != NULL) {
+return err;
+}
+
config->idle_scan_interval = atol(arg);
return NULL;
}
@@ -211,6 +223,12 @@
server_rec *s = cmd->server;
fcgid_server_conf *config =
ap_get_module_config(s->module_config, &fcgid_module);
+const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
+
+if (err != NULL) {
+return err;
+}
+
config->busy_scan_interval = atol(arg);
return NULL;
}
@@ -229,6 +247,12 @@
server_rec *s = cmd->server;
fcgid_server_conf *config =
ap_get_module_config(s->module_config, &fcgid_module);
+const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
+
+if (err != NULL) {
+return err;
+}
+
config->proc_lifetime = atol(arg);
return NULL;
}
@@ -246,6 +270,12 @@
server_rec *s = cmd->server;
fcgid_server_conf *config =
ap_get_module_config(s->module_config, &fcgid_module);
+const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
+
+if (err != NULL) {
+return err;
+}
+
config->error_scan_interval = atol(arg);
return NULL;
}
@@ -264,6 +294,12 @@
server_rec *s = cmd->server;
fcgid_server_conf *config =
ap_get_module_config(s->module_config, &fcgid_module);
+const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
+
+if (err != NULL) {
+return err;
+}
+
config->zombie_scan_interval = atol(arg);
return NULL;
}
@@ -281,6 +317,12 @@
server_rec *s = cmd->server;
fcgid_server_conf *config =
ap_get_module_config(s->module_config, &fcgid_module);
+const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
+
+if (err != NULL) {
+return err;
+}
+
config->sockname_prefix = ap_server_root_relative(cmd->pool, arg);
if (!config->sockname_prefix)
return "Invalid socket path";
@@ -300,6 +342,12 @@
server_rec *s = cmd->server;
fcgid_server_conf *config =
ap_get_module_config(s->module_config, &fcgid_module);
+const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
+
+if (err != NULL) {
+return err;
+}
+
config->shmname_path = ap_server_root_relative(cmd->pool, arg);
if (!config->shmname_path)
return "Invalid shmname path";
@@ -320,6 +368,12 @@
server_rec *s = cmd->server;
fcgid_server_conf *config =
ap_get_module_config(s->module_config, &fcgid_module);
+const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
+
+if (err != NULL) {
+return err;
+}
+
config->spawnscore_uplimit = atol(arg);
return NULL;
}
@@ -372,6 +426,12 @@
server_rec *s = cmd->server;
fcgid_server_conf *config =
ap_get_module_config(s->module_config, &fcgid_module);
+const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
+
+if (err != NULL) {
+return err;
+}
+
config->spawn_score = atol(arg);
return NULL;
}
@@ -388,6 +448,12 @@
server_rec *s = cmd->server;
fcgid_server_conf *config =
ap_get_module_config(s->module_config, &fcgid_module);
+const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
+
+if (err != NULL) {
+