From:             andrew at crannog-software dot com
Operating system: Windows 2000
PHP version:      4.3.9
PHP Bug Type:     PHP options/info functions
Bug description:  magic_quotes_gpc does not work per-directory

Description:
------------
When magic_quotes_gpc is controlled per-directory through the registry,
the return code from get_magic_quotes_gpc() reflects the change, but the
contents of $_GET, $_POST and $_COOKIE remain escaped or not escaped
according to the setting in php.ini.

The code below was run with magic_quotes_gpc=on in php.ini and
magic_quotes_gpc="0" in the registry for the folder in which the script
resides.

Reproduce code:
---------------
<html>
 <body>
  magic_quotes_gpc is <?php echo get_magic_quotes_gpc() ? "on" : "off";
?><br />
  text: <?php echo $_REQUEST['text']; ?><br />
  <form action="test.php">
   <input name="text" />&nbsp;<input type="submit" />
  </form>
 </body>
</html>

Expected result:
----------------
magic_quotes_gpc is off
text: "test"

Actual result:
--------------
magic_quotes_gpc is off
text: \"test\"

-- 
Edit bug report at http://bugs.php.net/?id=30527&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=30527&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30527&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30527&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=30527&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=30527&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=30527&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=30527&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=30527&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=30527&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=30527&r=notwrong
Not enough info:             http://bugs.php.net/fix.php?id=30527&r=notenoughinfo
Submitted twice:             http://bugs.php.net/fix.php?id=30527&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=30527&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=30527&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=30527&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=30527&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=30527&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=30527&r=float
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=30527&r=mysqlcfg

Reply via email to