summaryrefslogtreecommitdiff
path: root/sapi/apache_hooks/mod_php5.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2006-08-03 09:56:50 (GMT)
committerDmitry Stogov <dmitry@php.net>2006-08-03 09:56:50 (GMT)
commit29e1530cd778fa07d8cd3a742bf28c4ff7806cfc (patch)
tree03781a0aaf52601fdeb4cbf947fb376aaae03e3b /sapi/apache_hooks/mod_php5.c
parent6112a1266a15405c444fa4a7fe827c1abb42df13 (diff)
downloadphp-29e1530cd778fa07d8cd3a742bf28c4ff7806cfc.tar.gz
Added "PHPINIDir" Apache directive to apache and apache_hooks SAPIs
Diffstat (limited to 'sapi/apache_hooks/mod_php5.c')
-rw-r--r--sapi/apache_hooks/mod_php5.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/sapi/apache_hooks/mod_php5.c b/sapi/apache_hooks/mod_php5.c
index fcdb4d4..7d46ce6 100644
--- a/sapi/apache_hooks/mod_php5.c
+++ b/sapi/apache_hooks/mod_php5.c
@@ -1160,6 +1160,18 @@ static CONST_PREFIX char *php_apache_admin_flag_handler(cmd_parms *cmd, php_per_
}
/* }}} */
+/* {{{ php_apache_phpini_set
+ */
+static CONST_PREFIX char *php_apache_phpini_set(cmd_parms *cmd, HashTable *conf, char *arg)
+{
+ if (apache_sapi_module.php_ini_path_override) {
+ return "Only first PHPINIDir directive honored per configuration tree - subsequent ones ignored";
+ }
+ apache_sapi_module.php_ini_path_override = ap_server_root_relative(cmd->pool, arg);
+ return NULL;
+}
+/* }}} */
+
/* {{{ int php_xbithack_handler(request_rec * r)
*/
static int php_xbithack_handler(request_rec * r)
@@ -1431,6 +1443,7 @@ command_rec php_commands[] =
{"php_flag", php_apache_flag_handler, NULL, OR_OPTIONS, TAKE2, "PHP Flag Modifier"},
{"php_admin_value", php_apache_admin_value_handler, NULL, ACCESS_CONF|RSRC_CONF, TAKE2, "PHP Value Modifier (Admin)"},
{"php_admin_flag", php_apache_admin_flag_handler, NULL, ACCESS_CONF|RSRC_CONF, TAKE2, "PHP Flag Modifier (Admin)"},
+ {"PHPINIDir", php_apache_phpini_set, NULL, RSRC_CONF, TAKE1, "Directory containing the php.ini file"},
{NULL}
};
/* }}} */