InMotion Hosting Support Center

how to disable magic quotes

Category: Joomla 3

2013-05-04 11:24 am EST

Hits: 17,190
Hello, I started using Joomla 3 and now have problems and was told magic quotes need to be off for it to function correctly.

Using live chat they said I could disable it per cpanel in the php.ini file. I am unable to locate this file. Cpanel docs say it's here /usr/local/lib/php.ini.

It goes on to say this- However, we strongly recommend using WHM's PHP Configuration Editor feature (Main >> Service Configuration >> PHP Configuration Editor) to edit PHP's configuration file.

You must access the Advanced Configuration Editor to change many of the settings listed below.

I guess my main question is it safe to turn it off system wide via the WHM? My php is 5.3.16 and I have no Joomla 1.5 sites only 2.5 and 3

I also have some wordpress sites but all 3.5 and above.

Also a couple other misc. scripts, dadamail, etc.

Any advise?


You must login before you can ask a follow up question.

You must login before you can submit an answer.



43,761 Points
2013-05-06 11:07 am EST
Hello DaveOzric

Your default php.ini file exists for each cPanel account in your public_html folder. To edit the magic_quotes settings, you will first want to open your cpanel, navigate to the public_html folder using the File Manager, and then edit the php.ini file.

From there, look for the following lines:
; Magic quotes for incoming GET/POST/Cookie data.
;magic_quotes_gpc = On

; 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

Ensure they are all set to Off and save the file. This will disable the magic_quotes for that domain. If you wish to use the same php.ini settings for all folders under the public_html folder, you will need to set the php.ini file to be recursive.

Best Regards,
Scott M

You must login before you can post a comment about this answer.

Hi Scott!

All of my php.ini files have always been set to OFF, but I still get this error from Joomla. Your host needs to disable magic_quotes_gpc to run this version of Joomla! any other suggestions? Thanks!
3 Points
2014-07-01 4:19 pm EST

43,761 Points
2013-05-06 12:12 pm EST
Hello DaveOzric,

I neglected to answer your main question when giving the instructions on turning off Magic_quotes on a cpanel account basis. As far as affecting 2.5, it is simply an extra layer of security, but I would try and go with the Joomla recommendations for that version. If it does not say it is mandatory or recommended, there should be no problem in turning it off system wide.

Best Regards,
Scott M

You must login before you can post a comment about this answer.

Like this Question?

Joomla Community Google+ Hangout #3

June 3rd, 2014

Thank you @RustyJoomla for letting me speak on the Joomla Community Google+ Hangout!

Click here to watch!

Support Center Login

Our Login page has moved, Click the button below to be taken to the login page.

Need more Help?


Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail:
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!