Web Hosting Buzz Reseller and Dedicated Server Hosting Forums  

Go Back   Web Hosting Buzz Reseller and Dedicated Server Hosting Forums > Suggestions

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-27-2008, 03:25 AM
Alan B's Avatar
Alan B Alan B is offline
WHB Helper
 
Join Date: Jul 2007
Location: Toronto, Canada
Posts: 1,134
Default Change default php.ini to magic_quotes_gpc = Off

Perhaps WHB staff could address this.

PHP configuration on WHB servers has magic_quotes_gpc = On.
Is that a cPanel default, or is that something that WHB chooses?

If it's a choice, could WHB make the default magic_quotes_gpc = Off ?

From the PHP manual, and PHP Wiki:
Quote:
Why not to use Magic Quotes

Performance
Because not every piece of escaped data is inserted into a database, there is a performance loss for escaping all this data. Simply calling on the escaping functions (like addslashes()) at runtime is more efficient. Although php.ini-dist enables these directives by default, php.ini-recommended disables it. This recommendation is mainly due to performance reasons.

Inconvenience
Because not all data needs escaping, it's often annoying to see escaped data where it shouldn't be. For example, emailing from a form, and seeing a bunch of \' within the email. To fix, this may require excessive use of stripslashes().

Not all data that is supplied by the user is intended for insertion into a database. It may be rendered directly to the screen, stored in a session, or previewed before saving. This can result in backslashes being added where they are not wanted and being shown to the end user.

Security
Magic quotes also use the generic functionality provided by PHP's addslashes() function, which is not Unicode aware and still subject to SQL injection vulnerabilities in some multi-byte character encodings.

Removed from future versions, due to problems
In November 2005 the core PHP developers decided on account of these problems that the magic quotes feature would be removed from PHP 6.
Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump


All times are GMT. The time now is 05:04 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright WHB Networks LLC. All rights reserved.
SEO by vBSEO 3.2.0