From: php at koterov dot ru
Operating system: all
PHP version: 4.3.10
PHP Bug Type: PHP options/info functions
Bug description: Ability to turn off magic_quotes for parse_str().
Description:
------------
parse_str() always quotes arguments when magic_quotes_gpc is active on
startup (php.ini or .htaccess configured). But seems I cannot SWITCH OFF
magic_quotes_gpc on runtime FOR parse_str(). (I understand that it is
useless to try to switch off magic_quotes_gpc for purposes other than
parse_str!).
Seems it's a restriction of ini_set(), not parse_str() itself.
Reproduce code:
---------------
<?php
# magic_quotes_gpc MUST be ON in .htaccess or php.ini!
$qs = 'a="b"';
ini_set("magic_quotes_gpc", 0);
parse_str($qs, $p);
echo "<pre>".print_r($p, 1)."</pre>";
?>
Expected result:
----------------
Array
(
[a] => "b"
)
Actual result:
--------------
Array
(
[a] => \"b\"
)
--
Edit bug report at http://bugs.php.net/?id=31862&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31862&r=trysnapshot4
Try a CVS snapshot (php5.0):
http://bugs.php.net/fix.php?id=31862&r=trysnapshot50
Try a CVS snapshot (php5.1):
http://bugs.php.net/fix.php?id=31862&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=31862&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=31862&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=31862&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=31862&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=31862&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=31862&r=support
Expected behavior: http://bugs.php.net/fix.php?id=31862&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=31862&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=31862&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=31862&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31862&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=31862&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=31862&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=31862&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=31862&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=31862&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=31862&r=mysqlcfg