php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #40890 long set_magic_quotes_gpc(int new_setting)
Submitted: 2007-03-22 10:00 UTC Modified: 2007-03-22 10:30 UTC
From: bothie at gmx dot de Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: 5.2.1 OS: any
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: bothie at gmx dot de
New email:
PHP Version: OS:

 

 [2007-03-22 10:00 UTC] bothie at gmx dot de
Description:
------------
Add functions like "long set_magic_quotes_gpc(int new_setting)"

Having security in mind, many web application (WA) programmers expect magic_quotes_gpc to be set (or to be not set). It's possible to write WAs which can tolerate both settings but the most easiest ist to have just magic_quotes_gpc being set which is the default of course. But some sites have magic_quotes_gpc not set. So mixing WAs expecting magic_quotes_gpc to be set and WAs expecting magic_quotes_gpc not to be set is impossible. A new introduced function set_magic_quotes_gpc would change that as any program can enforce that setting in that way which it self expects it for it's own runtime. (This feature request should be seen a little bit more general, any other value which could be set in php.ini should get it's set_ counterpart as well except for some exceptions like disable_functions, for which a set- counterpart may not be so wise - or at least a set_disable_function should only be able to ADD additional functions to the set of disabled functions, not to REMOVE any of them specified in php.ini).

(I've just seen the ini_set-function and am very disappointed about it NOT supporting a change to magic_quotes_gpc!)


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-03-22 10:30 UTC] tony2001@php.net
>A new introduced function set_magic_quotes_gpc would change that as
>any program can enforce that setting in that way which it self
>expects it for it's own runtime. 

1) magic quotes are finally removed in PHP6.
2) changing this setting in runtime does not affect the data, because quotes are applied _before_ the script execution started.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Jul 04 20:01:35 2025 UTC