Safe in php5.3

Source: Internet
Author: User
When I restarted nginx today, I found the following error: PHPWarning: Directivesafe_modeisdeprecatedinPHP5.3andgreaterinUnknownonline0PHPWarning: warning.

When I restarted nginx today, I found this error: PHP Warning: Directive 'safe _ mode' is deprecated in PHP 5.3 and greater in Unknown on line 0 PHP Warning: directive 'Magic _ quotes_gpc 'is deprecated in PHP 5.3 and greater in Unknown on line 0 Unkn

When I restarted nginx today, I found this error.

PHP Warning: Directive 'safe _ mode' is deprecated in PHP 5.3 and greater in Unknown on line 0
PHP Warning: Directive 'Magic _ quotes_gpc 'is deprecated in PHP 5.3 and greater in Unknown on line 0

Unknown on line 0

I went to the official website and noted it with the red block. php5.3 does not recommend this stuff anymore. It has been discarded in PHP6:

Magic_quotes_gpc boolean
Warning
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.

In magic_quotes_gpc = on configuration, Magic quotes automatically escapes data when inserting data. To a certain extent, the security risks of scripts can be removed from beginners. For example, if you enable Magic quotes without any protection measures, there will be fewer risks, such as injection problems. I have read some security articles in the past. Intruders always like to choose magic_quotes_gpc = off. If they see its magic_quotes_gpc = on, it is estimated that they will not get this site.
So why should the Government abolish this stuff? After searching, I can see a post that is quite detailed and comprehensive. I will post the following reasons:
Why not use Magic quotes?

Portability
Whether or not this function is enabled affects the portability of scripts because it affects subsequent data filtering operations.

Performance problems
It is escaped before obtaining all external data, which will undoubtedly increase the runtime cost (and not all data needs to be escaped ).

Confusions
As mentioned above, not all data needs to be escaped. One possible scenario is when you use the stripslashes function "crazy" to get unescaped data.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.