Re: PHP/Apache configuration directives
| From: | Rasmus Lerdorf | Date: | Fri, 30 Jun 2000 09:37:24 +0000 |
| Subject: | Re: PHP/Apache configuration directives | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-3998@lists.php.net to get a copy of this message | ||
> I've also had trouble really understanding what the code is doing, but from
> what I can make out there is no significant distinction made between
> php_value and php_admin_value (at least in terms of what directives can and
> can not be given) in the mod_php4.c code. They just get passed to the Zend
> engine with a different parameter value.
>
> The difference appears to me to be that php_value directives apply to
> current directory while php_admin_value directives apply globally. Both
> forms of the directive seem to be handled by the same routine in the Zend
> engine, and perhaps this does further validation on what may be used in
> which context?
>
> Is the idea that you use the directive "php_admin_value" in the Apache
> global configuration file, and the directive "php_value" in the context of
> .htaccess files?
>
> Perhaps the developers could give us some clarification on this?
Hrm, I thought it was pretty clear, but I suppose you have to know a
little bit about the Apache API. The constants are almost
self-explanatory though:
command_rec php_commands[] =
{
{"php_value", php_apache_value_handler, NULL, OR_OPTIONS, TAKE2, "PHP Value
Modifier"},
{"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)"},
{NULL}
};
This tells you that php_value and php_flag are available anywhere
OR_OPTIONS allows it to be and the admin tags are only available in the
.conf file.
ie. if your AllowOverride includes "Options" you can use the php_value and
php_flag directives in your .htaccess file. And you can never use
php_admin_value and php_admin_flag in your .htacess file.
-Rasmus