Hi,
I am was absolutely stumped about MODx escaping simple apostrophes in snippets. If you submitted this:
$test=’hello’;
10 times, it would read:
$test=///////////////////////////’hello////////////////////////’;
This happened after I upgrade the server to Apache 2.2. Apparently on this cPanel machine, the PHP preference magic_quote_gpc is enabled by default, which causes all mySQL submissions to be escaped, rendering your snippet code destroyed.
I’m just posting here in case anyone else has the same problem. Setting magic_quotes_gpc to off solves it.
Best,
Per
Thanks for the post but the challenge with cpanel and some hosts (shared hosting) is they probably won’t turn off magic_quotes_gpc for you. So how how do you turn of magic_quotes_gpc.
-
☆ A M B ☆
- 2,475 Posts
Yep... I hate that. It’s the PHP config, not MODx.