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:

  1. Open the cPanel of your hosting account: cpanel arvixe joomla tutorials
  2. Go to the “Files” section and open the “File Manager”. Make sure you select the path where your Joomla site is located: files section file manager cpanel joomla tutorials select web root joomla tutorials arvixe hosting
  3. 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.
  4. 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”:  new file buttoncreating php file
  5. Open the “php5.ini” file and add the code below:
    • ; Magic quotes
      ;; Magic quotes for incoming GET/POST/Cookie data.
      magic_quotes_gpc = Off; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc.
      magic_quotes_runtime = Off; Use Sybase-style magic quotes (escape ‘ with ” instead of \’).
      magic_quotes_sybase = Off
      • magic quotes off code
  6. And that’s it! Magic Quotes has been disabled!
    If you ever face this issue, apply this solution.

This concludes Turn off magic_quotes_gpc for Joomla.

Looking for quality Joomla Web Hosting? Look no further than Arvixe Web Hosting!

Tags: , , , , , , , , , , , , , , , , , , , , | Posted under Joomla | RSS 2.0

Author Spotlight

Milton Parada

Milton Parada

I am a computer engineer, I specialize in Joomla, i am the core engineer of sw social web, I love photography.

2 Comments on Turn Off magic_quotes_gpc for Joomla

  1. Tord Dellsén says:

    Sorry but this didn’t work for me but i did find another solution.

    First my setup:
    I have joomla 3 installed in a subdomain

    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

    Hope this helps,
    Tord

Leave a Reply

Your email address will not be published. Required fields are marked *


× 7 = 42

You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>