# get_magic_quotes_gpc, get-magic-quotes-runtime in head, get a "final" decision

- Thread: https://externals.io/message/35189
- Original archive: https://news-web.php.net/php.internals/35189
- Started by Pierre Joye on 2008-02-05T20:23:06+00:00
- Messages: 56
- Page 1 of 3: messages 1 to 25 (25 per page, add `?page=N` to the URL)
- Next page: https://externals.io/message/35189.md?page=2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #35189 — Pierre Joye — 2008-02-05T20:23:06+00:00

URL: https://externals.io/message/35189#35189

Hi,

It seems that there is voices in favor of keeping the GPC related
functions in HEAD/php6 but returning always FALSE. I thought the
decision was already done but I rather prefer to ask the list a second
time and be done with this topic (and be free to bogus any other bug
reports about this problem, especially when the reporters begin to
spam me and other with all possible funny words ;-)

There is not really a need to discuss the removal again, that's why I
ask for a simple vote:

+1: remove them (as it is now in HEAD)
-1: Restore them and always return `FALSE` (not 0)
 0: I don't care, do what you wish, I never use them anyway

Feel free to comment the topic but please don't start an endless
discussion, we already discuss it to death two years ago (yes, two
years ago :-)

Thanks,
-- 
Pierre
http://blog.thepimp.net | http://www.libgd.org

---

## #35190 — Daniel Brown — 2008-02-05T20:26:12+00:00

URL: https://externals.io/message/35189#35190 · In reply to: #35189

> Hi,
>
> It seems that there is voices in favor of keeping the GPC related
> functions in HEAD/php6 but returning always FALSE.

    Personally....

    +1

-- 
</Dan>

Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?

---

## #35191 — Hannes Magnusson — 2008-02-05T20:29:20+00:00

URL: https://externals.io/message/35189#35191 · In reply to: #35189

> +1: remove them (as it is now in HEAD)
> -1: Restore them and always return `FALSE` (not 0)
>  0: I don't care, do what you wish, I never use them anyway

-1 (restore them) :)

-Hannes

---

## #35192 — Marco — 2008-02-05T20:29:52+00:00

URL: https://externals.io/message/35189#35192 · In reply to: #35189

I agree +1

Regards

Marco

---

## #35193 — David Coallier — 2008-02-05T20:35:35+00:00

URL: https://externals.io/message/35189#35193 · In reply to: #35192

+1

---

## #35194 — Markus Fischer — 2008-02-05T20:36:34+00:00

URL: https://externals.io/message/35189#35194 · In reply to: #35189

+1

---

## #35195 — Daniel Brown — 2008-02-05T20:36:48+00:00

URL: https://externals.io/message/35189#35195 · In reply to: #35190

> 
> > […]
>
>     Personally....
>
>     XX

    VOTE CHANGED

    -1

    After a quick off-list discussion with Hannes (gotta' love Gmail
chat), I realized that I forgot to consider backwards-compatibility.

-- 
</Dan>

Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?

---

## #35196 — Jeremy Privett — 2008-02-05T20:38:34+00:00

URL: https://externals.io/message/35189#35196 · In reply to: #35189

Pierre Joye wrote:
> Hi,
>
> It seems that there is voices in favor of keeping the GPC related
> functions in HEAD/php6 but returning always FALSE. I thought the
> decision was already done but I rather prefer to ask the list a second
> time and be done with this topic (and be free to bogus any other bug
> reports about this problem, especially when the reporters begin to
> spam me and other with all possible funny words ;-)
>
> There is not really a need to discuss the removal again, that's why I
> ask for a simple vote:
>
> +1: remove them (as it is now in HEAD)
> -1: Restore them and always return `FALSE` (not 0)
>  0: I don't care, do what you wish, I never use them anyway
>
> Feel free to comment the topic but please don't start an endless
> discussion, we already discuss it to death two years ago (yes, two
> years ago :-)
>
> Thanks,
>   

+1

-- 
Jeremy Privett
C.E.O. & C.S.A.
Omega Vortex Corporation

Web:    http://www.omegavortex.net
E-Mail: jeremy@omegavortex.net

Please note: This message has been sent with information that could be confidential and meant only for the intended recipient. If you are not the intended recipient, please delete all copies and inform us of the error as soon as possible. Thank you for your cooperation.

---

## #35197 — johannes@php.net — 2008-02-05T20:47:55+00:00

URL: https://externals.io/message/35189#35197 · In reply to: #35189

> +1: remove them (as it is now in HEAD)
> -1: Restore them and always return `FALSE` (not 0)
>  0: I don't care, do what you wish, I never use them anyway

+1 - remove them

Users can easily add these themselves, (if (!
function_exists('get_magic_quotes'))  function get_magic_quotes()
{return false;}} or an "compat" include) no need to keep them around.

johannes

---

## #35198 — Marcelo Araujo — 2008-02-05T21:11:11+00:00

URL: https://externals.io/message/35189#35198 · In reply to: #35197

+1 - remove them

--Marcelo



>
> 
> > […]
>
> +1 - remove them
>
> Users can easily add these themselves, (if (!
> function_exists('get_magic_quotes'))  function get_magic_quotes()
> {return false;}} or an "compat" include) no need to keep them around.
>
> johannes
>
> --
> 
> 
>
>


-- 
Marcelo Araujo
Founder & Software Architect
Cell Phone: +55 34 9144 1472
JMCodex (http://www.jmcodex.com)
skype: marcelocrosara

---

## #35202 — Richard Lynch — 2008-02-05T22:38:04+00:00

URL: https://externals.io/message/35189#35202 · In reply to: #35196

> > […]

I freely admit to not remembering a 2-year-old discussion, but it
seems to me for BC reasons you'd want to do this...

I know they've been marked "deprecated" and all, but, really, what's
the cost/penalty to having a couple functions around for legacy apps?

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?

---

## #35203 — Mike Willbanks — 2008-02-05T22:46:03+00:00

URL: https://externals.io/message/35189#35203 · In reply to: #35202

>
> I know they've been marked "deprecated" and all, but, really, what's
> the cost/penalty to having a couple functions around for legacy apps?
>

Then we will continue to be at the same old issue of they exist, people will
continue to use them and never move away from them.

Mike

---

## #35210 — Cristian Rodriguez — 2008-02-05T23:34:52+00:00

URL: https://externals.io/message/35189#35210 · In reply to: #35189

2008/2/5, Pierre Joye <pierre.php@gmail.com>:
> Hi,
>
> It seems that there is voice
> +1: remove them (as it is now in HEAD)

Remove them , they are of no use.

---

## #35212 — Daniel Brown — 2008-02-06T00:01:28+00:00

URL: https://externals.io/message/35189#35212 · In reply to: #35203

> > […]
>
> Then we will continue to be at the same old issue of they exist, people will
> continue to use them and never move away from them.

    Without expanding too much, I'd say that we're not going to
advertise the availability of the function, so people would no longer
use that.  However, removal of the function won't instantly break all
legacy scripts.  As Hannes and I were discussing off-list, I feel it's
something that should be removed in a Generation 7 or 8 release, but
with the function availability still existing in PHP5, I believe it's
too soon.

-- 
</Dan>

Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?

---

## #35216 — Pierre Joye — 2008-02-06T00:13:42+00:00

URL: https://externals.io/message/35189#35216 · In reply to: #35212

>
> 
> > […]
>
>     Without expanding too much, I'd say that we're not going to
> advertise the availability of the function, so people would no longer
> use that.  However, removal of the function won't instantly break all
> legacy scripts.  As Hannes and I were discussing off-list, I feel it's
> something that should be removed in a Generation 7 or 8 release, but
> with the function availability still existing in PHP5, I believe it's

Again, we are talking about PHP6 here. It is a one time opportunity to
drop these functions and be happy for the next 8 years.

But this has been discussed to death. Please say +1/-1/0 =)

-- 
Pierre
http://blog.thepimp.net | http://www.libgd.org

---

## #35218 — Steph Fox — 2008-02-06T00:21:18+00:00

URL: https://externals.io/message/35189#35218 · In reply to: #35216

> But this has been discussed to death. Please say +1/-1/0 =)

Pierre: Sorry, I didn't want to add to the noise, but for the sake of 
completeness I'll give you my 0.

- Steph


>
> -- 
> Pierre
> http://blog.thepimp.net | http://www.libgd.org

---

## #35219 — Rasmus Lerdorf — 2008-02-06T01:13:05+00:00

URL: https://externals.io/message/35189#35219 · In reply to: #35195

Daniel Brown wrote:
> 
> > […]
> 
>     VOTE CHANGED
> 
>     -1
> 
>     After a quick off-list discussion with Hannes (gotta' love Gmail
> chat), I realized that I forgot to consider backwards-compatibility.

I think a lot of people miss the point of these particular functions.
This isn't about whether to keep magic quotes or not, it is whether to
keep the function that tells you whether magic quote mangling is
enabled.  There is a lot of code out there that checks to see if this
feature is on, and deals with that case.  Having this function that
simply tells the code to take the other path will allow it to work.
This is not about restoring the magic quotes feature at all.

-Rasmus

---

## #35220 — Pierre Joye — 2008-02-06T01:30:08+00:00

URL: https://externals.io/message/35189#35220 · In reply to: #35219

Hi Rasmus,


> Daniel Brown wrote:
> > […]
>
> I think a lot of people miss the point of these particular functions.
> This isn't about whether to keep magic quotes or not, it is whether to
> keep the function that tells you whether magic quote mangling is
> enabled.  There is a lot of code out there that checks to see if this
> feature is on, and deals with that case.  Having this function that
> simply tells the code to take the other path will allow it to work.
> This is not about restoring the magic quotes feature at all.

Exactly, I thought it was clear.

As I can see it was, the votes (not that much ;) in favor of keeping
the functions argue about your example, keep the if
(get_magic_quotes_gpc...) working without changes (if (php6)...).

Cheers,
-- 
Pierre
http://blog.thepimp.net | http://www.libgd.org

---

## #35222 — Philip Olson — 2008-02-06T02:43:20+00:00

URL: https://externals.io/message/35189#35222 · In reply to: #35189

> It seems that there is voices in favor of keeping the GPC related
> functions in HEAD/php6 but returning always FALSE. I thought the
> decision was already done but I rather prefer to ask the list a second
> time and be done with this topic (and be free to bogus any other bug
> reports about this problem, especially when the reporters begin to
> spam me and other with all possible funny words ;-)
>
> There is not really a need to discuss the removal again, that's why I
> ask for a simple vote:
>
> +1: remove them (as it is now in HEAD)
> -1: Restore them and always return `FALSE` (not 0)
>  0: I don't care, do what you wish, I never use them anyway
>
> Feel free to comment the topic but please don't start an endless
> discussion, we already discuss it to death two years ago (yes, two
> years ago :-)
>

I can only find archives[1] that decide they should exist in PHP 6,  
and NEWS[2] indicates this decision to be true. Where else was this  
decision decided?

Them existing should depend on if PHP 6 wants a chance to run plenty  
of PHP 5 code out-of-the-box. Is this desire known yet?

And since they return 0 now, why would the return value be changed to  
false for this BC function?

Regards,
Philip

[1] http://marc.info/?t=114170222600003&r=1&w=2
[2] http://php.net/php6news

---

## #35224 — Hannes Magnusson — 2008-02-06T08:23:00+00:00

URL: https://externals.io/message/35189#35224 · In reply to: #35219

> Daniel Brown wrote:
> > […]
>
> I think a lot of people miss the point of these particular functions.
> This isn't about whether to keep magic quotes or not, it is whether to
> keep the function that tells you whether magic quote mangling is
> enabled.  There is a lot of code out there that checks to see if this
> feature is on, and deals with that case.  Having this function that
> simply tells the code to take the other path will allow it to work.
> This is not about restoring the magic quotes feature at all.

Exactly.
The problem is that if the function is removed then we are breaking
scripts for those few that actually check for MQ and deal with them.
The scripts by uneducated users that do not check for MQ will continue
to work as if nothing happened. However, by removing these functions
we are breaking all the scripts by the educated users who are
following best practices.

Furthermore, none of the MQ functions are even marked as depreciated yet.
What exactly is the gain in removing them completely?
All I'm asking is to keep PHP_FUNCTION(get_magic_quotes_gpc) { RETURN_FALSE; }

-Hannes

---

## #35228 — Derick Rethans — 2008-02-06T08:35:41+00:00

URL: https://externals.io/message/35189#35228 · In reply to: #35189

> There is not really a need to discuss the removal again, that's why I
> ask for a simple vote:
> 
> +1: remove them (as it is now in HEAD)
> -1: Restore them and always return `FALSE` (not 0)
>  0: I don't care, do what you wish, I never use them anyway

I don't care that much, but I think it would matter if the functions 
just are there and return false (so -1). 

for set_magic_quotes_runtime(), if "true" is passed, it should still 
throw a fatal error, if "false" is passed it should not (or actually 1 
vs 0).

Derick

---

## #35229 — Derick Rethans — 2008-02-06T08:36:35+00:00

URL: https://externals.io/message/35189#35229 · In reply to: #35203

> > […]
> 
> Then we will continue to be at the same old issue of they exist, people will
> continue to use them and never move away from them.

Err, no? magic quotes *itself* is removed - this is just the functions 
to check if it's enabled or not.

Derick

---

## #35242 — Jochem Maas — 2008-02-06T12:23:52+00:00

URL: https://externals.io/message/35189#35242 · In reply to: #35189

-1

Pierre Joye schreef:
> Hi,
> 
> It seems that there is voices in favor of keeping the GPC related
> functions in HEAD/php6 but returning always FALSE. I thought the
> decision was already done but I rather prefer to ask the list a second
> time and be done with this topic (and be free to bogus any other bug
> reports about this problem, especially when the reporters begin to
> spam me and other with all possible funny words ;-)
> 
> There is not really a need to discuss the removal again, that's why I
> ask for a simple vote:
> 
> +1: remove them (as it is now in HEAD)
> -1: Restore them and always return `FALSE` (not 0)
>  0: I don't care, do what you wish, I never use them anyway
> 
> Feel free to comment the topic but please don't start an endless
> discussion, we already discuss it to death two years ago (yes, two
> years ago :-)
> 
> Thanks,

---

## #35243 — Lokrain — 2008-02-06T12:30:37+00:00

URL: https://externals.io/message/35189#35243 · In reply to: #35189

-1



> Hi,
>
> It seems that there is voices in favor of keeping the GPC related
> functions in HEAD/php6 but returning always FALSE. I thought the
> decision was already done but I rather prefer to ask the list a second
> time and be done with this topic (and be free to bogus any other bug
> reports about this problem, especially when the reporters begin to
> spam me and other with all possible funny words ;-)
>
> There is not really a need to discuss the removal again, that's why I
> ask for a simple vote:
>
> +1: remove them (as it is now in HEAD)
> -1: Restore them and always return `FALSE` (not 0)
>  0: I don't care, do what you wish, I never use them anyway
>
> Feel free to comment the topic but please don't start an endless
> discussion, we already discuss it to death two years ago (yes, two
> years ago :-)
>
> Thanks,
> --
> Pierre
> http://blog.thepimp.net | http://www.libgd.org

---

## #35244 — Vesselin Kenashkov — 2008-02-06T12:58:30+00:00

URL: https://externals.io/message/35189#35244 · In reply to: #35243

+1 - remove the functions

To make a script compatible one has to add
function get_magic_quotes_gpc(){return 0;}
in one of his library files.

I think the current change is somewhat similar to PHP_INI_ALL in PHP ->
PHP_INI_PERDIR for magic_quotes_gpc made in 4.2.3. It also could lead to
breakage but it was done besides the fact that it wasnt a major release (I
guess bugfix for security reasons...).
Now is coming a major release and my opinion is that the deprecated features
must be removed even in the cost of BC breakage.

Probably a general policy on BC breakages in major releases has to be
discussed and then decide on per-case basis.
If there is already such a policy or guidelines please point me to it.



> -1
>
> 
>
> > […]

---

Next page: https://externals.io/message/35189.md?page=2
