Current time: 11-23-2024, 03:49 PM Hello There, Guest! (LoginRegister)


Post Reply 
Disabling magic_quotes_gpc for the panel
Author Message
aseques Offline
Member
*****
Dev Team

Posts: 330
Joined: May 2008
Reputation: 4
Post: #1
Disabling magic_quotes_gpc for the panel
Hi, I'm using fastcgi with a debian install, and there's a problem when installing roundcube.
The problem is that the default configuration is forcing magic_quotes_gpc = On
This is considered a bad behavior by the php team and is to be removed in the coming version 6

To disable it for the control panel you just have to go and edit the file /var/www/fcgi/master/php5/php.ini
In there you have to change the value to Off, reload your apache and everything will be working.

Since it's not recommended to use it, wouldn't be more interesting to keep it off by default and turn it on in case it's necessary?
07-11-2008 01:33 AM
Find all posts by this user Quote this message in a reply
Cube Offline
Member
***

Posts: 740
Joined: Apr 2007
Reputation: 9
Post: #2
RE: Disabling magic_quotes_gpc for the panel
What can happen with magic_quotes_gpc = On and Roundcube? I have not changed this and until now have not experienced any problems.
07-11-2008 02:44 AM
Find all posts by this user Quote this message in a reply
momo Offline
Junior Member
*

Posts: 148
Joined: Jun 2008
Reputation: 1
Post: #3
RE: Disabling magic_quotes_gpc for the panel
They suggest to no rely on it since it will be deprecated and removed in php6. I turned it off for roundcube and haven't remark anything wrong with ispcp. I think the dev team decided to keep using it since we are not using php6 yet.

Something wrong with turning this off? Advice?
07-16-2008 10:26 AM
Find all posts by this user Quote this message in a reply
aseques Offline
Member
*****
Dev Team

Posts: 330
Joined: May 2008
Reputation: 4
Post: #4
RE: Disabling magic_quotes_gpc for the panel
I've had had it for some days turned off, and everything is working fine with the control panel
The cons of using it, are:
"When magic_quotes are on, all ' (single-quote), " (double quote), \ (backslash) and NUL's are escaped with a backslash automatically. "

So, if you're using htmlspecialchars() or addslashes(), things might get double escaped, getting "test" saved as \\"test\\"

More information on http://es.php.net/manual/en/info.configu...quotes-gpc
07-16-2008 05:46 PM
Find all posts by this user Quote this message in a reply
tomdooley Offline
Development Team
*****
Dev Team

Posts: 332
Joined: Sep 2007
Reputation: 7
Post: #5
RE: Disabling magic_quotes_gpc for the panel
Some parts of the order panel have to be rewritten to work either with magic_quotes on or off. Warning from php.net:

Code:
This feature has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 6.0.0. Relying on this feature is highly discouraged.

Does anyone have a different meaning?
05-03-2009 10:21 PM
Visit this user's website Find all posts by this user Quote this message in a reply
pgentoo Offline
Member
*****
Dev Team

Posts: 326
Joined: Mar 2007
Reputation: 0
Post: #6
RE: Disabling magic_quotes_gpc for the panel
If it is deprecated, we should ideally update all of our core ispcp code to work without it, and switch the master/php5/php.ini to have it off.

Doing this for the user domains could be a pain though, as there is a lot of code out there requiring it. I don't think we can do this without providing some basic php.ini editing via the control panel (as discussed in other threads). If the user has the ability to toggle it on/off, then I don't think its as much of a problem changing the default, but without that all our admins will get a flood of support calls...

-
pgentoo
05-05-2009 12:29 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)