[TYPO3-core] RFC #4272: Inconsistent return values of ini_get() produce false positives for safe_mode detection

Helmut Hummel helmut at typo3.org
Thu Oct 7 13:27:02 CEST 2010


Hi,

Am 01.10.2010 14:15, schrieb Peter Beernink:
>
> This is a SVN patch request.
>
> Type: Bugfix
>
> BT reference: http://bugs.typo3.org/view.php?id=4272
>
> Branches: trunk, (4.4?)
>
> Problem: Inconsistent return values of ini_get() produce false positives
> for safe_mode detection
>
> Steps To Reproduce: Set safe_mode to ‘off’ instead 0 and try to use
> autodetection of ImageMagick in the install tool

The inconsistency is a configuration error.

If you set
safe_mode = Off

in the php.ini, ini_get returns the expected result.

If you set
php_admin_flag safe_mode Off

in the vhost configuration, ini_get returns the expected result.

If you set
php_admin_value safe_mode Off

in the vhost configuration, ini_get returns 'Off' as a result, leading 
to the problem mentioned in this RFC.

The funny fact is, that PHP turns the safe_mode off, if the value set by 
php_admin_value is different from 'On'. So setting the following:
php_admin_value safe_mode FooBar

turns the safe_mode off but ini_get will return 'FooBar'.

Regards Helmut


More information about the TYPO3-team-core mailing list