#30527 [Com]: magic_quotes_gpc does not work per-directory
| From: | hans at velum dot net | Date: | Sun, 21 Nov 2004 17:42:40 +0000 |
| Subject: | #30527 [Com]: magic_quotes_gpc does not work per-directory | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-69325@lists.php.net to get a copy of this message | ||
ID: 30527
Comment by: hans at velum dot net
Reported By: andrew at crannog-software dot com
Status: Open
Bug Type: PHP options/info functions
Operating System: Windows 2000
PHP Version: 4.3.9
New Comment:
I can confirm this on Windows 2003 w/ IIS 6 also. Note that the
magic_quotes_sybase INI setting is also being ignored. Basically it's
always doing magic_quotes_gpc -- despite the phpinfo() / ini_get
showing the desired per-directory values.
Previous Comments:
------------------------------------------------------------------------
[2004-10-22 11:43:25] andrew at crannog-software dot com
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" /> <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 this bug report at http://bugs.php.net/?id=30527&edit=1