0

I know it's such a dump question, but it makes my life difficult. I wonder why in my server, there will be added a backslash before ' (single quote). So if I input script like '/home/user/public_html/file.csv' it will be \'/home/user/public_html/file.csv\' when I save the profile. It causes some error because magmi misinterpret the script. I tried to remove it from conf file manually, but then it will be added again everytime I save it. But it only happen in the server with linux, it doesn't happen in my localhost with windows. Is there any solution for this issue?

Abaij
  • 853
  • 2
  • 18
  • 34

1 Answers1

1

Your server may have magic_quotes_gpc enabled, which automatically escapes double and single quotes with a backslash.

You can try disabling it by adding the following in your .htaccess file:

php_flag magic_quotes_gpc Off

or using a php.ini override:

magic_quotes_gpc = Off

You can read more about disabling magic quotes at PHP: Disable Magic Quotes - Manual

Axel
  • 10,732
  • 2
  • 30
  • 43
  • Thank you, @Axel... I found that the `php_flag magic_quotes_gpc` is off. Now it's set to On but it doesn't give any effect. Is it working right after I change it or it needs sometime to work? – Abaij Jul 21 '13 at 10:50
  • No, you want to ensure that it's **off**. Try turning it off, and creating a php file only containing `` and seeing what state the variable is in. – Axel Jul 22 '13 at 14:41