About PHP automatic escape problem, configuration in the history of MAGIC_QUOTES_GPC legacy issues

Source: Internet
Author: User
today the friend's website again problem (because just moved to new space various problems), so looked up a problem, found PHP data decode

After changed to NULL, this is very strange ah, so I measured in the local, no problem, then I went online to check, said decode request format is very strict

A little inaccurate will not work, so I put the data with Var_dump, found escaped, but no problem.

1. And then I did the first kind of test.

I put this data (var_dump printed data, copied out) directly decode, the result is possible. (Local can be outside the network can also)

2. Direct access to data decode

The result is displayed as null

I wonder why it is ....

Every time the PHP version upgrade, I rarely care about what has changed, at most the next latest version, this is really a bad habit,

Haha, not now, I win PHP is 5.3,mac is 5.6, the external network server is 5.2, a total of 3 versions

So I thought about whether it would be a PHP version problem (because local can)

Surf the Internet. Sure enough, there is a MAGIC_QUOTES_GPC option in the php.ini, open phpinfo () to find that he is on

This option escapes the user input, and the version is removed after php5.4, and the following steps are modified

1. Open php.ini

2. Find out where MAGIC_QUOTES_GPC is located

3. Change No to OFF

4. Restart the server

Everything OK.

The above describes the PHP automatic escape problem, the configuration of MAGIC_QUOTES_GPC legacy issues, including aspects of the content, I hope that the PHP tutorial interested in a friend helpful.

  • 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.