Page 1 of 1

[SOLVED] Backslashes in News

Posted: Thu May 01, 2008 10:07 pm
by Matio
Hi!

I've got problem with submitting news. I've recently switched my host and restored database. And when I want to submit or update news items, backslash is added before " (quote) character. I tried to turn TinyMCE off, but that doesn't seem to solve it. Quotes are also "backslashed" in comments. When I enter the data through PhpMyAdmin, it works, but posting through admin interface or comments text area puts backslashes before apostrophes.

Any ideas, what could be the reason for this? Bad database encoding, possibly...

Thanks.

CMSMS: 1.2.4
News Module: 2.7
Encoding: utf-8

Re: Backslashes in News

Posted: Thu May 01, 2008 11:46 pm
by nivekiam
You need to turn magic quotes off.

Add this line in your .htaccess file:

php_flag magic_quotes_gpc off

Re: Backslashes in News

Posted: Fri May 02, 2008 7:29 am
by Matio
Thank you, nivekiam. That works perfectly.

Re: [SOLVED] Backslashes in News

Posted: Mon Jul 28, 2008 11:52 pm
by long.nathaniel
I'm having this same problem, but the .htaccess edit didn't fix it.  Are there any other options hidden somewhere that could be causing this?

Re: [SOLVED] Backslashes in News

Posted: Tue Jul 29, 2008 1:26 am
by Nullig
You could try adding:

ini_set('magic_quotes_runtime', 0);

near the top of your config.php file.

Nullig