Thursday 23 May 2013

How to Disable/Turn off magic quotes gpc for Joomla 3.0

In Joomla 3.0, if the magic quotes is ON on server, then it will add the slashes when we have quotation marks (double/single) or adding any images, and it will cause the content to display on the proper format.

To turn off/disable magic quotes gpc for Joomla 3, please follow the below steps.

For most Share Hosting Servers running a CGI-Webinterface 
1. Create a php.ini file and add following code:
# To turn off/disable magic quotes gpc for Joomla
magic_quotes_gpc = Off
extension=pdo.so
extension=pdo_mysql.so

2. Put it in your Joomla 3 root. Then change the htaccess.txt in your Joomla 3 root to .htaccess. Add the following lines to the .htaccess file (at the top) :
# To turn off/disable magic quotes gpc for Joomla

  suPHP_ConfigPath /home/username/public_html/yourJoomlaFolder
  
    order allow,deny
    deny from all
  

Change "username" and "yourJoomlaFolder" to your respective folders.
The "/home/myusername/public_html/yourJ3folder" can be found via the Global Configuration:

OR, if you have Joomla running under /public_html folder, then just add "/home/myusername/public_html" and it will work. .htaccess for some hosts.

 For some hosts, add "php_flag magic_quotes_gpc off" to the .htaccess file.

source: http://docs.joomla.org/How_to_turn_off_magic_quotes_gpc_for_Joomla_3