#23663 [NEW]: ini_get bug when directives come from .htaccess

From: Date: Fri, 16 May 2003 19:06:08 +0000
Subject: #23663 [NEW]: ini_get bug when directives come from .htaccess
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-39806@lists.php.net to get a copy of this message
From: jdell_nv at yahoo dot com Operating system: Linux 2.4.20smp (RH9) PHP version: 4.3.2RC2 PHP Bug Type: Apache related Bug description: ini_get bug when directives come from .htaccess Hi, I'm running apache 1.3.27 and PHP 4.3.2 RC2 (both compiled from source). I found a problem when you setup apache to 'AllowOverride All' and then set php directives from the .htacess file. For example, the magic_quotes_gpc directive: With php.ini configs, the ini_get value: magic_quotes_gpc = 1 or blank With .htacess configs, the ini_get value: magic_quotes_gpc = On or Off So (as per php.net docs) ini_get is converting the "On/Off" values in php.ini to "1" or blank, but if the value comes from .htaccess, it is not converted (they stay as "On/Off" values). This causes problems when developers assume ini_get returns boolean and can be used in an expression such as "if (ini_get('magic_quotes_gpc'))..." because ini_get can return "Off" which will evaluate to TRUE. I think this is a bug in ini_get or is an undocumented behavior. Please let me know if any other information would be helpful in figuring this out! Thanks, John -- Edit bug report at http://bugs.php.net/?id=23663&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=23663&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=23663&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=23663&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=23663&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=23663&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=23663&r=support Expected behavior: http://bugs.php.net/fix.php?id=23663&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=23663&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=23663&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=23663&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23663&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=23663&r=dst IIS Stability: http://bugs.php.net/fix.php?id=23663&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=23663&r=gnused

« previous php.bugs (#39806) next »