View Issue Details

IDProjectCategoryView StatusLast Update
320WADFCorepublic24 Jan 2010 21:56
Reportermrosenquist Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version0.13.2 
Target Version0.13.3Fixed in Version0.13.3 
Summary320: When using mod_php the php.ini variables are set using php_admin_*, preventing runtime overload
DescriptionWhen using mod_php the php.ini variables are changed in to php_admin_*, preventing runtime overload. This is not consistent with the installation of the php.ini for CGI use, when the variables *can* be overloaded at runtime.
TagsNo tags attached.

Activities

timj

17 Jan 2010 10:35

manager   ~324

I did this intentionally because certain options can only be set in mod_php using php_admin_* and I didn't want to maintain a big (and changing) list (see http://www.php.net/manual/en/configuration.changes.php ). However I agree it is not ideal from an overloading/consistency perspective.

timj

17 Jan 2010 10:43

manager   ~325

In PHP 5.3 there is now an extra param on ini_get_all() which returns the access level, which would allow us to automatically use php_admin_* or php_*. However I don't know of a way to get this information in PHP < 5.3.

mrosenquist

17 Jan 2010 16:23

reporter   ~327

There are two options


one is to try and set the value.
example:

isPhpAdminVariable($ini_variable)
{
  return ini_set($ini_variable, ini_get($ini_variable));
}

The other is use the ini_get_all(),
the $details option added in 5.3.0 is only to suppress the output of the extra details (by default it is true).

Example:
php -r 'echo phpversion()."\n";print_r(ini_get_all());'

5.2.6
Array
(
    [allow_call_time_pass_reference] => Array
        (
            [global_value] => 1
            [local_value] => 1
            [access] => 6
        )

    [allow_url_fopen] => Array
        (
            [global_value] => 1
            [local_value] => 1
            [access] => 4
        )

    [allow_url_include] => Array
        (
            [global_value] => 0
            [local_value] => 0
            [access] => 4
        )

    [always_populate_raw_post_data] => Array
        (
            [global_value] => 0
            [local_value] => 0
            [access] => 6
        )

    [arg_separator.input] => Array
        (
            [global_value] => &
            [local_value] => &
            [access] => 6
        )

 ...

timj

17 Jan 2010 18:54

manager   ~330

Well spotted, I overlooked the use of the third param for ini_get_all().
Fixed in SVN r2044

Issue History

Date Modified Username Field Change
14 Jan 2010 17:42 mrosenquist New Issue
17 Jan 2010 10:30 timj Summary When using mod_php the php.ini variables are changed in to php_admin_value/flag not php_value/flag, inconsistent with suex => When using mod_php the php.ini variables are changed in to php_admin_*, preventing runtime overload
17 Jan 2010 10:30 timj Description Updated
17 Jan 2010 10:35 timj Note Added: 324
17 Jan 2010 10:43 timj Note Added: 325
17 Jan 2010 16:23 mrosenquist Note Added: 327
17 Jan 2010 18:54 timj Note Added: 330
17 Jan 2010 18:54 timj Status new => resolved
17 Jan 2010 18:54 timj Resolution open => fixed
17 Jan 2010 18:54 timj Fixed in Version => 0.13.3
17 Jan 2010 18:54 timj Target Version => 0.13.3
17 Jan 2010 18:54 timj Summary When using mod_php the php.ini variables are changed in to php_admin_*, preventing runtime overload => When using mod_php the php.ini variables are set using php_admin_*, preventing runtime overload
24 Jan 2010 21:56 timj Status resolved => closed