Joomla 3.x.x is Adding Slashes Automatically

Tuesday, 09 September 2014 00:00

I have been using Joomla 3.x.x for quite a while now and have had it installed on many different types of servers. It seems on some servers, when you want to use quotes in the content such as in Article Manager, it will automatically ad slashes to try and escape the quotes. This can be very annoying and brake your site. Below are the steps that have worked for me to stop the adding of slashes.

1. Create a php.ini file with the following...

magic_quotes_gpc = Off
magic_quotes_runtime = Off
magic_quotes_sybase = Off

Place the php.ini into the root of your web server

2. Add the following to your .htaccess file

SetEnv PHPRC /home/****/public_html/php.ini

Update 9/11/2014 - I found in other server the SetEnv is not working so I use suPHP to support that issue.

<IfModule mod_suphp.c>
  suPHP_ConfigPath /home/****/public_html
  <Files php.ini>
    order allow,deny
    deny from all

Replace the **** with your servers username (this guide is for cPanel Server or similar) but you can adopt the step even you are not cPanel hosting..

Hopefully this will work for you.