Magic Quotes and Joomla 3 – PHP Conflict

  • By: Cris M.
  • Apr 4, 2013
  • 0
Share

This article explains the Magic Quote and Joomla issue recently found. It also presents a solution on how to fix it.

Magic Quotes was a PHP feature built to assist newcomers to write SQL commands. It has been removed from the PHP language on version 5.4 due to security reasons. There were vulnerabilities on Magic Quotes.

The new Joomla version 3 is not compatible with Magic Quotes. It messes up the articles (HTML pages and modules) by adding  the slash bar once you save the article inside the Joomla backend. It can be quite frustrating and labor intensive to fix the messed up page. Note that some hosting companies and servers might not be running the newest version of the PHP.

We have a solution to assist developers to fix this issue in a quick manner: upload a file to the server which will turn off Magic Quotes for the specific hosting account.

Solution Steps to Fix Magic Quote Issue:

If not existent in your files, create a php.ini file with the codes below. Via FTP or cPanel, upload a PHP.ini file inside the public_html folder and Administrator folders.

Code for PHP.ini

session.save_path = “/tmp”
magic_quotes_gpc = Off
magic_quotes_runtime = Off
magic_quotes_sybase = Off
Important: If your hosting account already has a PHP.ini file, do not overwrite with the new one. Instead, open the existing file and add the codes above.

For any further assistance with Joomla website design development, contact us.

Comments

Your email address will not be published.