Back slash added before " on save??

4 posts by 2 authors in: Forums > CMS Builder
Last Post: April 9, 2010   (RSS)

By gkornbluth - April 9, 2010

OK, here's a weird one that just appeared.

The home page of thecraftgallery.net is powered by a single record editor with only text fields and text boxes.

The site has been working fine for quite a while.

Now, every time I save the record I get a back slash added before any quotes in any field. If I save the record again another back slash is added. These are visible in the editor.

I thought it might be a glitch that developed in my installation 2.01 so I upgraded to 2.03, cleared the cache, tried with another browser. Same problem

I'm stumped.

Any ideas appreciated.

Best,

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [gkornbluth] Back slash added before " on save??

By Jason - April 9, 2010

Hi Jerry,

It sounds like php on your server is using a feature called magic quotes. This automatically adds backslashes to things like single and double quotes. This feature really isn't recommended anymore. Here is how you can turn it off.

If you can get into the php.ini file on your server you'll want to search for the following lines:

magic_quotes_gpc = off;

magic_quotes_runtime= off;

magic_quotes_sybase= off;

Take sure they are all set to off.

If you don't have access to php.ini, you can try adding this to your .htaccess file:

php_flag magic_quotes_gpc Off

If that doesn't work. You can contact your hosting provider about how to turn off magic quotes.

Hope that helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Back slash added before " on save??

By gkornbluth - April 9, 2010

Thanks Jason,

I'm talking to the hosting company right now.

Another thing to document in the Cookbook.

Thanks for the insight.

Best,

Jerry
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php