We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23637
    • 43 Posts
    Hello!

    Suddenly when I save any content (including chunks and snippets) all apostrophes and quotes has been changed to \' and \". When I save one more time it becomes \\\' test \\\".
    It destroys all my site. Everything worked well before.
    I have Evolution 1.0.6

    Why?

    This question has been answered by sottwell. See the first response.

    [ed. note: podeig last edited this post 14 years, 1 month ago.]
    • discuss.answer
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Something changed on your server; perhaps your hosting company upgraded the version of PHP. The problem is in a PHP setting, magic_quotes_gpc. This setting needs to be turned off. You may need to contact your tech support to find out how to turn it off.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 23637
        • 43 Posts
        Thank you for your answer.

        You were right magic_quotes_gpc was on. I have changed php.ini and turned it off. But I still have this problem.

        May be something more I have to change?
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          If your server is using an Apache module for PHP (mod_php) then you have to restart Apache after making any changes to the php.ini file.

          Also, any items that you saved into the database won't be changed; you'll have to edit them and fix them.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 23637
            • 43 Posts
            I found that it is possible to use .user.ini with magic_quotes_gpc=off as content. Then I do not need to restart php. Thank you, sottwell, for your help! smiley