[SOLVED] Backslashes in News

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
Matio
Forum Members
Forum Members
Posts: 17
Joined: Sat Jul 14, 2007 2:54 pm

[SOLVED] Backslashes in News

Post 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
Last edited by Matio on Fri May 02, 2008 7:31 am, edited 1 time in total.
nivekiam

Re: Backslashes in News

Post by nivekiam »

You need to turn magic quotes off.

Add this line in your .htaccess file:

php_flag magic_quotes_gpc off
Matio
Forum Members
Forum Members
Posts: 17
Joined: Sat Jul 14, 2007 2:54 pm

Re: Backslashes in News

Post by Matio »

Thank you, nivekiam. That works perfectly.
long.nathaniel

Re: [SOLVED] Backslashes in News

Post 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?
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm
Location: Comox Valley, BC

Re: [SOLVED] Backslashes in News

Post by Nullig »

You could try adding:

ini_set('magic_quotes_runtime', 0);

near the top of your config.php file.

Nullig
Post Reply

Return to “CMSMS Core”