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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
30 - 6 = ?
Subscribe to this entry?

 
 [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

Pull Requests

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 Oct 31 23:01:28 2024 UTC