{"id":48244,"date":"2015-05-11T03:15:08","date_gmt":"2015-05-11T07:15:08","guid":{"rendered":"http:\/\/www.templatemonster.com\/help\/?p=48244"},"modified":"2017-07-11T11:12:01","modified_gmt":"2017-07-11T15:12:01","slug":"joomla-3-x-how-to-turn-off-magic-quotes","status":"publish","type":"post","link":"https:\/\/www.templatemonster.com\/help\/joomla-3-x-how-to-turn-off-magic-quotes.html","title":{"rendered":"Joomla 3.x. How to turn off magic quotes"},"content":{"rendered":"<p><a href=\"http:\/\/www.youtube.com\/watch?v=K9PbIBmP9aA?width=1280&amp;height=720\" rel=\"prettyPhoto\">Joomla 3.x. How to turn off magic quotes<\/a><\/p>\r\n<p>This tutorial will show you how to turn off magic quotes in  Joomla 3.x.<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/05\/Joomla_3_How_to_turn_off_magic_quotes_1.png\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/05\/Joomla_3_How_to_turn_off_magic_quotes_1-300x231.png\" alt=\"Joomla_3_How_to_turn_off_magic_quotes_1\" width=\"300\" height=\"231\" class=\"aligncenter size-medium wp-image-48245\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/05\/Joomla_3_How_to_turn_off_magic_quotes_1-300x231.png 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/05\/Joomla_3_How_to_turn_off_magic_quotes_1-150x115.png 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/05\/Joomla_3_How_to_turn_off_magic_quotes_1.png 929w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\r\n<p>Magic Quotes was a PHP feature, enabled using the magic_quotes_gpc setting, that escaped (in a very limited way) most of the input data accessible to PHP scripts.<br \/>\r\nThis PHP feature has been deprecated as of PHP 5.3.0 and has been removed from PHP as of PHP 5.4.0.<br \/>\r\nJoomla! 3.0 and above requires magic_quotes_gpc to be set to off and will not install if magic_quotes_gpc is on.<\/p>\r\n<p> If you are using <strong>WAMP<\/strong> (local server software), follow the steps below:<\/p>\r\n<ol>\r\n<li>\r\n<p> Navigate to <strong>WAMP<\/strong> application &gt;<strong> PHP<\/strong> (tab) &gt; <strong>PHP settings<\/strong> &gt; uncheck <strong>&#8216;magic quotes gps&#8217;<\/strong>, <strong>&#8216;magic quotes runtime&#8217;<\/strong>, <strong>&#8216;magic quotes sybase&#8217;<\/strong>;<\/p>\r\n<\/li>\r\n<li>\r\n<p>Restart WAMP&#8217;s servers:<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/05\/Joomla_3_How_to_turn_off_magic_quotes_2.png\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/05\/Joomla_3_How_to_turn_off_magic_quotes_2-300x171.png\" alt=\"Joomla_3_How_to_turn_off_magic_quotes_2\" width=\"300\" height=\"171\" class=\"aligncenter size-medium wp-image-48246\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/05\/Joomla_3_How_to_turn_off_magic_quotes_2-300x171.png 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/05\/Joomla_3_How_to_turn_off_magic_quotes_2-150x85.png 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/05\/Joomla_3_How_to_turn_off_magic_quotes_2.png 514w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\r\n<\/li>\r\n<\/ol>\r\n<p>If your site is on live server, there are few ways to turn of &#8216;magic quotes&#8217;:<\/p>\r\n<p>The first method:<\/p>\r\n<ol>\r\n<li>\r\n<p>Open <strong>File Manager<\/strong> through your control panel (SiteAdmin or cPanel) and ensure you are in the <strong>public_html <\/strong>(www) directory (also ensure that &quot;hidden files&quot; are visible);<\/p>\r\n<\/li>\r\n<li>\r\n<p>Then, click<strong> &#8216;New File&#8217;<\/strong> tab to access the tool to create a new file;<\/p>\r\n<\/li>\r\n<li>\r\n<p>Create <strong>php.ini<\/strong> or <strong>php5.ini <\/strong>file;<\/p>\r\n<\/li>\r\n<li>\r\n<p>Click<strong> &#8216;Edit&#8217;<\/strong> link at the top of the page or with a right mouse click. This will open the file editor so you can input your custom configuration settings;<\/p>\r\n<\/li>\r\n<li>\r\n<p>Insert the following code:<\/p>\r\n<pre>magic_quotes_gpc = Off <\/pre>\r\n<\/li>\r\n<li>\r\n<p>Make the <strong>php.ini<\/strong> recursive in the <strong>.htaccess <\/strong>file. Change the file &#8216;<strong>htaccess.txt&#8217;<\/strong> in your Joomla 3 root to <strong>&#8216;.htaccess&#8217;<\/strong>. Add the following lines to the <strong>&#8216;.htaccess&#8217;<\/strong> file (at the top), don&#8217;t forget to change<strong> &#8216;php.ini&#8217;<\/strong> to <strong>&#8216;php5.ini&#8217;<\/strong> when applicable :<\/p>\r\n<pre>&lt;IfModule mod_suphp.c&gt;\r\nsuPHP_ConfigPath \/home\/myusername\/public_html\/yourJ3folder\r\n&lt;Files php.ini&gt;\r\norder allow,deny\r\ndeny from all\r\n&lt;\/Files&gt;\r\n&lt;\/IfModule&gt;<\/pre>\r\n<\/li>\r\n<li>\r\n<p>Change<strong> &#8216;myusername&#8217; <\/strong>and <strong>&#8216;yourJ3folder&#8217;<\/strong> to your respective folders. The<strong> &#8216;\/home\/myusername\/public_html\/yourJ3folder&#8217;<\/strong> can be found via the <strong>Global Configuration<\/strong>:<\/p>\r\n<p>In <strong>Joomla backend<\/strong> &gt; <strong>System<\/strong> &gt;<strong> System Information<\/strong> &gt; <strong>[Directory Permissions]<\/strong>, the folder is usually the same as the log directory (but without \/logs at the end):<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/05\/Joomla_3_How_to_turn_off_magic_quotes_3.png\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/05\/Joomla_3_How_to_turn_off_magic_quotes_3-300x135.png\" alt=\"Joomla_3_How_to_turn_off_magic_quotes_3\" width=\"300\" height=\"135\" class=\"aligncenter size-medium wp-image-48247\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/05\/Joomla_3_How_to_turn_off_magic_quotes_3-300x135.png 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/05\/Joomla_3_How_to_turn_off_magic_quotes_3-150x67.png 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/05\/Joomla_3_How_to_turn_off_magic_quotes_3.png 769w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n<\/li>\r\n<li>\r\n<p>For some hosts, add the following code to the <strong>&#8216;.htaccess&#8217;<\/strong> file in the root of your site (for example \/home\/myusername\/public_html\/.htaccess):<\/p>\r\n<pre>php_flag magic_quotes_gpc off<\/pre>\r\n<\/li>\r\n<\/ol>\r\n<p>The <strong>second method: <\/strong><\/p>\r\n<ol>\r\n<li>\r\n<p>Open up <strong>File Manager<\/strong>;<\/p>\r\n<\/li>\r\n<li>\r\n<p>Create<strong> &#8216;php.ini&#8217;<\/strong> file;<\/p>\r\n<\/li>\r\n<li>\r\n<p>Add this code to the file and save changes:<\/p>\r\n<pre>magic_quotes_gpc = Off\r\nmagic_quotes_runtime = Off\r\nmagic_quotes_sybase = Off<\/pre>\r\n<\/li>\r\n<li>\r\n<p>Edit your <strong>&#8216;.htaccess&#8217;<\/strong> file by adding this line to the top, save the file;<\/p>\r\n<\/li>\r\n<li>\r\n<p>Set Env PHPRC \/home\/youruser\/public_html\/php.ini;<\/p>\r\n<\/li>\r\n<li>\r\n<p>Test if the error message goes away.<\/p>\r\n<\/li>\r\n<\/ol>\r\n<p>The <strong>third method<\/strong> (works for <strong>PHP 5.3<\/strong> and higher):<\/p>\r\n<ol>\r\n<li>\r\n<p>Open <strong>File Manager<\/strong>;<\/p>\r\n<\/li>\r\n<li>\r\n<p>Create <strong>&#8216;.user.ini&#8217;<\/strong> file in your Joomla root directory;<\/p>\r\n<\/li>\r\n<li>\r\n<p>Add this code to the file and save changes:<\/p>\r\n<pre>magic_quotes_gpc = Off<\/pre>\r\n<\/li>\r\n<\/ol>\r\n<p>In case you have any difficulties, it is strongly recommended that you contact  your hosting provider.<\/p>\r\n<p>Feel free to check the detailed video tutorial below:<\/p>\r\n<p><a href=\"http:\/\/www.youtube.com\/watch?v=K9PbIBmP9aA?width=1280&amp;height=720\" rel=\"prettyPhoto\">Joomla 3.x. How to turn off magic quotes<\/a><\/p>\r\n\r\n<div class=\"inline-banner\">\r\n<a href=\"https:\/\/www.templatemonster.com\/cart.php?addOffer=587\">\r\n<img src=\"\/help\/files\/banners\/inline\/Banner-1-(500-x100).jpg\" \/>\r\n<\/a>\r\n<\/div>","protected":false},"excerpt":{"rendered":"<p>This tutorial will show you how to turn off magic quotes in  Joomla 3.x.<\/p>\n","protected":false},"author":13,"featured_media":48252,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[724],"tags":[483,1971,1972],"_links":{"self":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/48244"}],"collection":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/comments?post=48244"}],"version-history":[{"count":1,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/48244\/revisions"}],"predecessor-version":[{"id":81888,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/48244\/revisions\/81888"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media\/48252"}],"wp:attachment":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media?parent=48244"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/categories?post=48244"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/tags?post=48244"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}