Forums

Mysteriously added backslashes

HerKle 12 Jan, 2015
Hi,
when working on my local development (xampp, joomla 2.5, php 5.3), all fields with php code add a slash prior to quotation mark, which makes code like
return date('Y-m-d');
look as
return date(\'Y-m-d\');
causing of course disfunction and errors – and with each saving adding more and more backslashes, so that I even found some
return date(\\\\\\\'Y-m-d\\\\\\\');
.
In the live environment (joomla 2.5, php 5.4) this doesn't happen. Is that a bug which has to do with php version or what else might cause that? Thankful for any comment,
Herbert
esl 13 Jan, 2015
1 Likes
I just saw this for a quick second and it I got a message saying something about magic quotes then I removed them and it was all good, it was on hostgator hosting
HerKle 13 Jan, 2015
Answer
Thanks, esl! They were activated in some .htaccess file.
So I switched
php_flag magic_quotes_gpc off

and everything is working fine again.
This topic is locked and no more replies can be posted.