Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Joomla 3 magic_quotes_gpc = Off Requirement
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  18 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Nick Savov  
View profile  
 More options Aug 10 2012, 1:26 pm
From: Nick Savov <n...@iowawebcompany.com>
Date: Fri, 10 Aug 2012 10:26:45 -0700 (PDT)
Local: Fri, Aug 10 2012 1:26 pm
Subject: Joomla 3 magic_quotes_gpc = Off Requirement

Hi everyone,

Joomla 3 is looking great!  Great job to everyone!

One concern that I have is the requirement of magic_quotes_gpc to Off
during installation.  If you have a flexible host and they allow you to
modify or override the php.ini, everything's OK (after a bit of work to
make the code changes).  However, if you don't have a flexible host you
might be stuck or have to migrate hosts.  Additionally, what happens when
some of the 2.5 users start upgrading to 3.0?  We currently do not have a
pre-upgrade check for magic_quotes_gpc = Off, so that would result in
strange bugs.

In Joomla 2.5, magic_quotes_gpc to Off was not a requirement, but rather
just a recommendation. In Joomla 3, it is a requirement.  I recommend that
we make magic_quotes_gpc = Off a recommendation (rather than a requirement)
for Joomla 3.

The con to making it a recommendation (rather than a requirement):
1) Those sites with magic_quotes_gpc = On, wouldn't run as fast as they
would if it was Off.

The Pros to making it a recommendation (rather than a requirement):
1) Those sites with magic_quotes_gpc = On, would be able to use Joomla 3.

To me, the pro definitely outweighs the con.  Also, if they wanted to, they
could go through the work of turning off magic_quotes_gpc (it just wouldn't
be a requirement).

In short, it's a win/win situation for everyone if magic_quotes_gpc to Off
was not a requirement, but rather just a recommendation.

If we decided to go that route, basically it would involve unescpaing all
input data before we start to handle the request.

Kind regards,
Nick


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
infograf768  
View profile  
 More options Aug 10 2012, 1:48 pm
From: infograf768 <infograf...@gmail.com>
Date: Fri, 10 Aug 2012 10:48:32 -0700 (PDT)
Local: Fri, Aug 10 2012 1:48 pm
Subject: Re: Joomla 3 magic_quotes_gpc = Off Requirement

Indeed.
In fact, with the experience we have of the very slooooow move from most
hosts to propose php 5 in the past years, we do know that it will take much
time to gets hosts setting magic_quotes_gpc = Off. (Even Rochen does not do
it on its shared servers)

We already have difficulties to get the the maority of our users to move
from 1.5 to 2.5.
It is not the time IMHO to release an 3.x reserved to a few.

As far as I understand this requires some code change that could be done in
CMS only

Regards
JM

Le vendredi 10 août 2012 19:26:45 UTC+2, Nick Savov a écrit :


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Amy Stephen  
View profile  
 More options Aug 10 2012, 2:00 pm
From: Amy Stephen <amystep...@gmail.com>
Date: Fri, 10 Aug 2012 11:00:00 -0700 (PDT)
Subject: Re: Joomla 3 magic_quotes_gpc = Off Requirement

Magic quotes is deprecated in PHP 5.3 and scheduled for removal in 5.4.
IMO, it was a well intentioned, but bad idea that should be removed from
PHP. It's best for the platform to manage escaping, rather than to rely
upon (or have to discover and then undo) another "dumb" process for such an
important function.

Couple of good resources:

   - http://php.net/manual/en/security.magicquotes.php
   - http://en.wikipedia.org/wiki/Magic_quotes

Not even sure this should be an installation check for the CMS, though,
since the php.ini setting is automatically disabled during startup, even in
the current release.

https://github.com/joomla/joomla-cms/blob/master/includes/framework.p...

Might be as simple as removing the check.

Might be better to discuss on the Platform list.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nick Savov  
View profile  
 More options Aug 10 2012, 3:22 pm
From: "Nick Savov" <n...@iowawebcompany.com>
Date: Fri, 10 Aug 2012 14:22:36 -0500
Local: Fri, Aug 10 2012 3:22 pm
Subject: Re: [jcms] Re: Joomla 3 magic_quotes_gpc = Off Requirement
Hi Amy,

Thanks for your thoughts on the matter!

Re:
https://github.com/joomla/joomla-cms/blob/master/includes/framework.p...

Looks like the code is checking for magic_quotes_runtime rather than
magic_quotes_gpc and that the two are different.  If I try installing
Joomla 3 on our Rochen server, I can't get past the pre-install check
because magic_quotes_gpc = On, so the code:
@ini_set('magic_quotes_runtime', 0);

must not have an affect on magic_quotes_gpc.

As to PHP versions, Joomla 3 will still be supporting PHP 5.3.1+:
http://www.joomla.org/technical-requirements.html

so this is still an issue, IMO. At the very least, we need a pre-upgrade
check when users go from Joomla 2.5.x to Joomla 3.

What are your thoughts based on the above information?

Kind regards,
Nick


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Amy Stephen  
View profile  
 More options Aug 10 2012, 4:06 pm
From: Amy Stephen <amystep...@gmail.com>
Date: Fri, 10 Aug 2012 15:06:08 -0500
Local: Fri, Aug 10 2012 4:06 pm
Subject: Re: [jcms] Re: Joomla 3 magic_quotes_gpc = Off Requirement

I would ask on the platform list if either the current 'runtime' is enough,
or if 'gpc' can also be disabled and if disabling both would then
effectively remove the need for the CMS to check the magic quotes
configuration during install.

The platform is doing the escaping and my gut feel is they aren't going to
want to add 'antiquated' magic quote text to the new JInput class.

The CMS controls the boot sequence files (that I linked to) and very
recently took control of the installation process - so if the platform team
concurs, you might be able to bi-pass the install step due to what is there
or, as you have pointed out, adding the gpc disable.

That would be ideal. But, it would be important to ask about this on the
platform list since I am not certain and they are the ones to advise on
this.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Amy Stephen  
View profile  
 More options Aug 10 2012, 4:07 pm
From: Amy Stephen <amystep...@gmail.com>
Date: Fri, 10 Aug 2012 15:07:54 -0500
Local: Fri, Aug 10 2012 4:07 pm
Subject: Re: [jcms] Re: Joomla 3 magic_quotes_gpc = Off Requirement

On Fri, Aug 10, 2012 at 3:06 PM, Amy Stephen <amystep...@gmail.com> wrote:

> the platform team concurs, you might be able to bi-pass the install step

Meaning => you might be able to bypass the installer check for magic quotes.

In case that was confusing.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nick Savov  
View profile  
 More options Aug 10 2012, 4:27 pm
From: "Nick Savov" <n...@iowawebcompany.com>
Date: Fri, 10 Aug 2012 15:27:33 -0500
Local: Fri, Aug 10 2012 4:27 pm
Subject: Re: [jcms] Re: Joomla 3 magic_quotes_gpc = Off Requirement
Sounds good.  Thank you, Amy!  I'll write up something in the platform
list later today.

Kind regards,
Nick


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Amy Stephen  
View profile  
 More options Aug 12 2012, 12:46 pm
From: Amy Stephen <amystep...@gmail.com>
Date: Sun, 12 Aug 2012 09:46:06 -0700 (PDT)
Local: Sun, Aug 12 2012 12:46 pm
Subject: Re: Joomla 3 magic_quotes_gpc = Off Requirement

Nick -

You are right, that line I pointed to during system bootup will not take
care of this issue. magic_quotes_gpc must be handled at a system level.
Here's a better reference on the gpc magic quotes
http://www.php.net/manual/en/security.magicquotes.disabling.php

Maybe the platform will continue support for assuming this php directive is
turned on (like example 2 on the link above.) Seems a shame to run all
traffic through that logic to turn off what should have never been
activated to begin with, it does penalize those sites using better hosts.

Or, maybe the CMS can add a system plugin that can be activated for such
sites to disable the option? Not sure if an event fires at the right time,
tho. Maybe the platform would add one if they don't want to add the
escaping logic back?

If the installation requirement remains, the problem could be addressed by
providing information to those who need it. Perhaps a little asterisk by
the failed install option linking to a Wiki document that explains how to
deactivate this option if ones host is forcing it on. example from Godaddy
-
http://support.godaddy.com/groups/web-hosting/forum/topic/how-to-turn...

Good luck!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Beat  
View profile  
 More options Aug 13 2012, 4:41 am
From: Beat <beat...@gmail.com>
Date: Mon, 13 Aug 2012 01:41:10 -0700 (PDT)
Local: Mon, Aug 13 2012 4:41 am
Subject: Re: Joomla 3 magic_quotes_gpc = Off Requirement

Hi Nick,
Hi Jean-Marie,

I agree with you. Very good points.
Adding one more little vote for making GPC off NOT a requirement, but just
a recommendation.

Why imho:
1) we want to spread Joomla as broad as possible, and thus user's mandatory
hosting hassles should be kept as low as possible
2) the extra-cost to sites with GPC OFF is only a single "if" line
statement, that is executed once when _REQUEST is parsed, so virtually
nothing compared to rest of Joomla's heavy code.
3) a lot of people will migrate from 1.5 directly to 3.x, usually into a
sub-folder, and having the requirement for a separate hosting setup is not
really friendly.

Best Regards,
Beat
http://www.joomlapolis.com/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Amy Stephen  
View profile  
 More options Aug 13 2012, 11:44 am
From: Amy Stephen <amystep...@gmail.com>
Date: Mon, 13 Aug 2012 08:44:39 -0700 (PDT)
Local: Mon, Aug 13 2012 11:44 am
Subject: Re: Joomla 3 magic_quotes_gpc = Off Requirement

Beat -

Do you know where that single IF statement is? (Link please?)

Thanks,
Amy


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Marc Studer  
View profile   Translate to Translated (View Original)
 More options Aug 17 2012, 7:53 pm
From: Marc Studer <gars...@gmail.com>
Date: Fri, 17 Aug 2012 16:53:44 -0700 (PDT)
Local: Fri, Aug 17 2012 7:53 pm
Subject: Re: Joomla 3 magic_quotes_gpc = Off Requirement

Hello,

I confirm. This pre-check blocks under MacOS MAMP.
I have try to set a php.ini with the "magic_quotes_gpc on" and
"magic_quotes_runtime on"
and with a .htaccess with "php_flag magic_quotes_gpc on"
But it doesn't seems to work.

I will test harder ... but if a solution (like an hack on the famous "if"
statment ( where ?)) can help, thank you.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rouven Weßling  
View profile  
 More options Aug 17 2012, 8:01 pm
From: Rouven Weßling <m...@rouvenwessling.de>
Date: Sat, 18 Aug 2012 02:01:28 +0200
Local: Fri, Aug 17 2012 8:01 pm
Subject: Re: [jcms] Joomla 3 magic_quotes_gpc = Off Requirement

Uh, magic_quotes_gpc has to be off not on.

Rouven

On 18.08.2012, at 01:53, Marc Studer <gars...@gmail.com> wrote:

  smime.p7s
6K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Marc Studer  
View profile  
 More options Aug 21 2012, 12:56 pm
From: Marc Studer <gars...@gmail.com>
Date: Tue, 21 Aug 2012 09:56:10 -0700 (PDT)
Local: Tues, Aug 21 2012 12:56 pm
Subject: Re: [jcms] Joomla 3 magic_quotes_gpc = Off Requirement

Hello,

LOL …. oops, thank you Rouven, i have read this topic... hum, but it seems
that i won't be enough concentrate, i have replace Off by On in all my
tests (oops) without really thinking about the meaning !
So, i correct my test, by just renaming the htaccess.txt by .htaccess and
add the following command line at top of my .htaccess before launching
Joomla installation, it works ok on MacOS MAMP :

php_flag magic_quotes_gpc off

Thank you for the help ;)

Now the question is (as it has been said earlier in this topic) :
- does this pre-check will be maintain as we know that several hosters
force the value at "On" ?

Kind regards
Marc


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nick Savov  
View profile  
 More options Sep 8 2012, 11:14 pm
From: Nick Savov <n...@iowawebcompany.com>
Date: Sat, 8 Sep 2012 20:14:44 -0700 (PDT)
Local: Sat, Sep 8 2012 11:14 pm
Subject: Re: Joomla 3 magic_quotes_gpc = Off Requirement

Since I'm seeing a consensus, I've opened up a bug report for the issue:
http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEd...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sebastien Chartier  
View profile  
 More options Oct 4 2012, 10:10 am
From: Sebastien Chartier <sebastien.chart...@gmail.com>
Date: Thu, 4 Oct 2012 07:10:54 -0700 (PDT)
Local: Thurs, Oct 4 2012 10:10 am
Subject: Re: Joomla 3 magic_quotes_gpc = Off Requirement

I tried everything to fix the double quotes (") being escaped (\") .

I tried disabling magic_qotes any way possible but this did not worked! The only solution I found was editing [b]library/joomla/input/filter/input.php[/b].

[b]Function clean (line 159)[/b]

[code]public function clean($source, $type = 'string') {

        // Handle the type constraint
        switch (strtoupper($type)) {
            case 'INT':[/code]

as follow:

[code]public function clean($source, $type = 'string') {

        if(get_magic_quotes_gpc()){
            if (is_string($source))
                $source = stripslashes($source);
            else if(is_array($source))
                array_walk($source, create_function ('&$var', '$var=stripslashes($var);'));
        }

        // Handle the type constraint
        switch (strtoupper($type)) {
            case 'INT':[/code]


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kakrona Chan  
View profile  
 More options Nov 13 2012, 10:34 am
From: Kakrona Chan <kakrona.c...@gmail.com>
Date: Tue, 13 Nov 2012 07:34:14 -0800 (PST)
Local: Tues, Nov 13 2012 10:34 am
Subject: Re: Joomla 3 magic_quotes_gpc = Off Requirement

Hey guys!

Do you guys have any idea how to turn margic_quotes_gpc = off? I face this problem: https://picasaweb.google.com/lh/photo/0It6uGg-6kXO5xUQRMKsf9MTjNZETYm...

I try creating php.ini but it still doesn't work


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mario  
View profile  
 More options Nov 15 2012, 4:54 am
From: Mario <mpproe...@gmail.com>
Date: Thu, 15 Nov 2012 01:54:16 -0800 (PST)
Local: Thurs, Nov 15 2012 4:54 am
Subject: Re: Joomla 3 magic_quotes_gpc = Off Requirement

Be aware that turning magic_quotes_gpc to off for 3.0+ installation to be
successful won't solve your problems.

Changing the .htaccess file and placing it in in your installation
directory, will allow the successful installation only but you'll find,
later on, if your server is using php 5.3+, that it won't work and you'll
get a bunch of bugs all over the place. with slashes ( \ ) being overloaded
every time you save data that should quoted to the database.

For instance, your script saves the data "The President's dog" and when you
retrieve it from your db, it will be rendered as "The President\'s dog".
Now save it again and again and you start getting "The President\\\\\\\\'s
dog". Unless you place the similar .htaccess file in every directory, which
is unthinkable, you'll find that you really have to change the server's php
configuration and there turn magic_quotes_gpc to off.  

Severs running php 5.3+ should, by default have magic_quotes_gpc = off
since, as it was mention above, the function is deprecated and scheduled
for removal on php 5.4.

Mario


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nick Savov  
View profile  
 More options Nov 20 2012, 12:22 am
From: "Nick Savov" <n...@iowawebcompany.com>
Date: Mon, 19 Nov 2012 23:22:12 -0600
Local: Tues, Nov 20 2012 12:22 am
Subject: Re: [jcms] Re: Joomla 3 magic_quotes_gpc = Off Requirement
Hi Kakrona,

Sorry, but this list is for Joomla Core CMS developers and discussion of
how to improve the CMS.  If you're still having the issue, you should
instead ask on the Joomla forum.  Here's the direct link to it:
forum.joomla.org/

After posting on there, reply to this email with a link to the forum post
so that we can follow up and help you out on there.

Looking forward to helping.

Kind regards,
Nick


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »