From: nickj-phpbugs at nickj dot org Operating system: Debian Woody GNU/Linux 3.0r6 PHP version: 5CVS-2005-06-23 (dev) PHP Bug Type: *General Issues Bug description: ini_get("allow_url_fopen") should return boolean string, not the literal string
Description: ------------ Currently ini_get("allow_url_fopen") appears to return a literal string, not a boolean value/string. For example, if the php.ini contains "allow_url_fopen = on", then ini_get("allow_url_fopen") will return "on", not "1". This is inconsistent with the documentation. The php.ini documentation at http://au3.php.net/manual/en/ref.filesystem.php#ini.allow-url-fopen says 'allow_url_fopen' is a "boolean" configuration directive. The ini_get() documentation at http://php.net/ini-get says: When querying boolean values: A boolean ini value of 'off' will be returned as an empty string or "0" while a boolean ini value of 'on' will be returned as "1". Therefore, if the php.ini contains "allow_url_fopen = on", then ini_get("allow_url_fopen") should return "1"; but it does not. Additionally, in the php.ini itself, it lists the supported INI boolean constants as being "On, Off, True, False, Yes, No and None". It would therefore probably be good if (in addition to the 'on' and 'off' constants) the 'true', 'false', 'yes', 'no' and 'none' constants worked in the same way as well. I have written a series of small .phpt PHP unit-tests that demonstrate the above, and I will add a URL for these in the next few minutes. -- Edit bug report at http://bugs.php.net/?id=33443&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33443&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33443&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33443&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=33443&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=33443&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=33443&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=33443&r=needscript Try newer version: http://bugs.php.net/fix.php?id=33443&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=33443&r=support Expected behavior: http://bugs.php.net/fix.php?id=33443&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=33443&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=33443&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=33443&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33443&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=33443&r=dst IIS Stability: http://bugs.php.net/fix.php?id=33443&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=33443&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=33443&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=33443&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=33443&r=mysqlcfg