htscanner ========= Description ----------- When using a cgi version of php (plain old cgi or fast-cgi) apache can't pass any php settings from htaccess files it parses. This can be solved by giving each user it's own php.ini file, but I didn't like that solution. This extension parses these configuration files (in most cases .htaccess) and changes the settings. It will search all directories for a configuration file from the docroot until the directory where the request scripts is found. Note: When you don't load the mod_php module in apache, apache will give a 500 error when it finds an htaccess file with a php_* directive. You can prevent this by using a diffirent file for php or by putting: php_value foo bart around the settings. This way apache will ignore them. If for some reasons you like to allow your users to have .htaccess files without , you can use the patch below, provided by Eugeny Zadevalov , against apache 2.0.59. === diff -uNr httpd-2.0.59/server/core.c httpd-2.0.59/server/core.c --- httpd-2.0.59/server/core.c 2006-07-12 07:40:55.000000000 +0000 +++ httpd-2.0.59/server/core.c 2006-12-20 16:54:16.000000000 +0000 @@ -1638,6 +1638,11 @@ "> directive missing closing '>'", NULL); } +static const char *php_dummy_handler(cmd_parms *cmd, void *dummy, const char *name, const char *value) +{ + return NULL; +} + static const char *dirsection(cmd_parms *cmd, void *mconfig, const char *arg) { const char *errmsg; @@ -3155,6 +3160,10 @@ static const command_rec core_cmds[] = { +/* Dummy php_* commands */ +AP_INIT_TAKE2("php_value", php_dummy_handler, NULL, OR_OPTIONS, "Dummy PHP Value Modifier"), +AP_INIT_TAKE2("php_flag", php_dummy_handler, NULL, OR_OPTIONS, "Dummy PHP Flag Modifier"), + /* Old access config file commands */ AP_INIT_RAW_ARGS("