Joomla 3.x.x is Adding Slashes Automatically

Rate this item
(1 Vote)

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
  </Files>
</IfModule>

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.

Read 2219 times Last modified on Thursday, 11 September 2014 00:30
Kenneth Pabon

is a web developer/designer from Laguna, Philippines. He specializes in web development using open source content management systems such as Joomla, Drupal, Magento and Wordpress.

Website: www.krules.net
More in this category: « Top 5 Rated Joomla Extensions