Turn Off magic_quotes_gpc for Joomla

Magic Quotes is the process of escaping special characters with a ‘\’ to allow a string to be entered into a database. This is called ‘magic’ because PHP can do this automatically when magic_quotes_gpc is turned on. Joomla 3 specifically requires Magic Quotes to be off before installing it, otherwise you will not be able to install it or face issues with your images. In this article I will give you a step-by-step guide on how to turn off Magic_Quotes_GPC for Joomla.

Follow these steps:

Open the cPanel of your hosting account:

Go to the “Files” section and open the “File Manager”. Make sure you select the path where your Joomla site is located:

Check if there is a file “php5.ini” on the web root folder of your Joomla site. If there is already a php.ini file renamed it to “php5.ini”, then go to step 5.

If no “php5.ini” file is found, in the file manager, click on “New File” to create the “php5.ini” file. Enter the name of the file(php5.ini) and click on “Create New File”:

5 Comments on Turn Off magic_quotes_gpc for Joomla

Solution:
What i did to solve the problem was to go into
cpanel -> “PHP settings”
and under “PHP.ini Creator” choose
“Click to create PHP.ini (Placed in Home)”

And then for “magic_quotes_gpc” change to “Off”
(i didn’t change “magic_quotes_runtime” or anything else)
Then i pressed “Update”

This created a 36 KB large file called “php.ini” (not “php5.ini”) in my public_html directory (not the home directory). After this i didn’t get the error message any more. But to avoid problems for my other sites i moved the new file into the subdirectory where i have Joolma installed (in my case a directory called “joolma30″ which is two levels down from “public_html”), and this still worked for me, no error message any more

I had this problem with Joomla installed in a sub-domain, none of the solutions provided here worked. A php.ini file with magic_quotes_gpc = Off in the public_html folder had no effect, similarly the php.ini file in the joomla30 folder had no effect.

Tech support fixed it but did not tell me the solution, I discovered with some exploration, that the php.ini file with magic_quotes_gpc = Off needs to be located in the joomla30/administrator folder this fixed the problem.
I verified this by creating a new sub-domain and installing Joomla, until the php.ini file is placed in the joomla30/administrator folder the magic_quotes error persisted in Joomla. Having the php.ini in the public root or the joomla30 folders alone had no affect.