|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-05-18 11:47 UTC] sniper@php.net
[2003-05-18 15:37 UTC] jdell_nv at yahoo dot com
[2003-05-18 16:32 UTC] derick@php.net
[2003-05-18 21:33 UTC] alindeman@php.net
[2020-02-07 06:12 UTC] phpdocbot@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 07 10:00:01 2026 UTC |
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