Re: Difference between php_flag & php_admin_flag
| From: | Gerard Samuel | Date: | Thu, 27 Nov 2003 01:54:25 +0000 |
| Subject: | Re: Difference between php_flag & php_admin_flag | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-171152@lists.php.net to get a copy of this message | ||
On Wednesday 26 November 2003 05:21 pm, Gerard Samuel wrote:
> That is not explained in the manual....
> As far as I can tell, the difference (according to the manual) is that one
> can be overridden by an .htaccess file, while the other cannot....
>
> Im testing to see how my script is behaving in an environment with
> safe_mode turned on.
> In apache's config file, I tried both
> php_flag and php_admin_flag, and they seem to exibit different behaviour.
> When using php_admin_flag with safe_mode turned on,
> php behaves as if it were in a total lock down state.
> For example, if the script is owned by foo:foo, it will not be able to
> access a file owned by bar:bar.
>
> If I change php_admin_flag to php_flag with safe_mode still on, then php
> behaves a bit relaxed.
> Where if a script is owned by foo:foo, will be able to access a file owned
> by bar:bar
>
> im currently running php 4.3.3 on FreeBSD 4.8.
> Has anyone experienced anything like this???
Ok, I found out what was happening on my end..
According to http://us2.php.net/manual/en/configuration.changes.php,
php_value
only influences PHP_INI_ALL and PHP_INI_PERDIR type directives.
safe_mode (according to http://us2.php.net/manual/en/function.ini-set.php)
is
a PHP_INI_SYSTEM type directive.
So for the apache config option to be effective, use
php_admin_value for safe_mode....