php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32867 ini_set has no effect for magic_quotes_gpc
Submitted: 2005-04-28 12:46 UTC Modified: 2005-05-01 00:01 UTC
From: Arne dot Heizmann at csr dot com Assigned:
Status: Not a bug Package: PHP options/info functions
PHP Version: 4.3.11 OS: Windows 2000
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: Arne dot Heizmann at csr dot com
New email:
PHP Version: OS:

 

 [2005-04-28 12:46 UTC] Arne dot Heizmann at csr dot com
Description:
------------
I have tried
  ini_set ('magic_quotes_gpc', 0);
and
  ini_set ('magic_quotes_gpc', 'Off');
and various others, but I still get those stupid backslashes.

Reproduce code:
---------------
    ini_set ('magic_quotes_gpc', 0);
    echo '<pre>'. get_array_val ('x', $_POST) . '</pre>';
    echo "<form action='/test2.php' method='post'>
          <input type='text' name='x' value='&#39;' />
          <input type='submit' />
          </form>";


Expected result:
----------------
Upon submitting the form, you should see an apostrophe.

Actual result:
--------------
You see a backslash followed by an apostrophe.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-04-28 12:51 UTC] sniper@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

By the time that ini_set() call is run, the request data is already processed.

 [2005-05-01 00:01 UTC] rasmus@php.net
magic_quotes_gpc is applied while parsing the request before your PHP script gets control so while you can change this setting in your script, it won't have any effect.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 16 09:01:32 2024 UTC