Magic Quotes GPC Off ?

Need help installing Joomla! 3.x? For all Joomla! 3.x installation issues please use this forum.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
hirudo
I've been banned!
Posts: 24
Joined: Sat Apr 13, 2013 11:40 am

Re: Magic Quotes GPC Off ?

Post by hirudo » Tue Mar 04, 2014 4:13 pm

I asked my web host for my PHP 5.3 launch, And my problem was solved in this case.
thank you.

jrkahrhoff
Joomla! Intern
Joomla! Intern
Posts: 99
Joined: Thu Feb 25, 2010 2:46 pm

Re: Magic Quotes GPC Off ?

Post by jrkahrhoff » Mon Mar 24, 2014 8:22 pm

I upgraded to PHP 5.4 and the magic quote error disappeared - it has been eliminated completely from PHP 5.4.

I was on 5.3 and upgraded and the error disappeared!! Lol, I didn't have to do anything else!!

Now, this was for a Joomla 3.2.3 site that I migrated to GoDaddy from my personal server. I imported my database and all my files using ftp. So the install portion was done on another server!

Hope that helps someone - not sure if magic quotes would be an issue on a fresh install of Joomla 3.2.3 when using PHP 5.4

thienphucvn
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Thu Mar 20, 2014 2:54 am
Location: Hà Nội
Contact:

Re: Magic Quotes GPC Off ?

Post by thienphucvn » Wed Mar 26, 2014 4:07 am

An addendum to my original solution to getting Joomla 3.0 to install.
The following is a multiple step solution to
1. Install
2. Turn Magic Quotes off

Step 1.
Copy your Joomla 3.0 folders to your webhost
Create a php.ini file with the following lines:

magic_quotes_gpc = Off
session.save_path = "/tmp"

Copy the php.ini file to your /installation subfolder on your webhost.
(You may or may not need the session.save_path line and you might need to edit it for the specific location of the /tmp folder on your webhost)

Now you should be able to go to your browser , open your website and have Joomla think magic quotes is off. (It isn't really, but this will let you install at least.)
Proceed with your install.

Step2.
Go to the root folder of your website and create a php.ini file
Add the following lines:

magic_quotes_gpc = Off
magic_quotes_runtime = Off
magic_quotes_sybase = Off

Next we need to edit/create a .htaccess file in the root directory
it should have the following line:

SetEnv PHPRC /path /to/php.ini

The path will vary depending on your webhost
For example on my own site it is set as follows:

"SetEnv PHPRC /home/username/public_html/php.ini" where the username is my cpanel username.

Now for the usual problems.
If you create a php.ini file or a .htaccess file in some editors, be aware they may add an extension to the filename.

Make sure php.ini ISN'T really php.ini.txt for example.
And don't forget the "." in front of the .htaccess

I hope this guide helps someone struggling to get Joomla working.
Hang in there, it is well worth the effort.

-------------------------

Thank you , hi

amthucgiaitri
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Fri Apr 11, 2014 2:37 am

Re: Magic Quotes GPC Off ?

Post by amthucgiaitri » Fri Apr 11, 2014 2:42 am

Please note that if your hosting include many websites, you just need upload php5.ini to your root hosting folder (not root of website). I have try and get success now.

Incase you are not success to turn magic_quotes_gpc off, please feel free to contact me by skype at boducoscar. I have searching and test nearly 1 day for only turn this off, so i know how disappointed you are in this problem :)

php5.ini code:

magic_quotes_gpc = Off
magic_quotes_runtime = Off
magic_quotes_sybase = Off

4commerce
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Fri Aug 22, 2014 9:34 pm

Re: Magic Quotes GPC Off ?

Post by 4commerce » Fri Aug 22, 2014 10:13 pm

makevalue wrote:
mrteetd wrote:silicon_chip, the php.ini file I put in the installation folder worked like a charm. Thanks. Except this error comes up.

Error

Your host needs to disable magic_quotes_gpc to run this version of Joomla!
php.ini

magic_quotes_gpc = Off
session.save_path = "/tmp"
To have a php.ini be part of the hosting environment, it needs to be in the root folder. Check with your hosting company to clarify how to put it there. Some hosts doe not show the root in their file manager or ftp access.
Hi everyone,

This is the first time that I tried Joomla ever... and I tried to install 3.3.3 version with success thanks to silicon_chip's advice; however. I'm having anerror message in Joomla's back that says:


Error

Your host needs to disable magic_quotes_gpc to run this version of Joomla!

Your host needs to disable magic_quotes_gpc to run this version of Joomla!



Any thoughts about how to fix this?
Regards

4commerce
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Fri Aug 22, 2014 9:34 pm

Re: Magic Quotes GPC Off ?

Post by 4commerce » Fri Aug 22, 2014 10:52 pm

4commerce wrote:
makevalue wrote:
mrteetd wrote:silicon_chip, the php.ini file I put in the installation folder worked like a charm. Thanks. Except this error comes up.

Error

Your host needs to disable magic_quotes_gpc to run this version of Joomla!
php.ini

magic_quotes_gpc = Off
session.save_path = "/tmp"
To have a php.ini be part of the hosting environment, it needs to be in the root folder. Check with your hosting company to clarify how to put it there. Some hosts doe not show the root in their file manager or ftp access.
Hi everyone,

This is the first time that I tried Joomla ever... and I tried to install 3.3.3 version with success thanks to silicon_chip's advice; however. I'm having anerror message in Joomla's back that says:


Error

Your host needs to disable magic_quotes_gpc to run this version of Joomla!

Your host needs to disable magic_quotes_gpc to run this version of Joomla!



Any thoughts about how to fix this?
Regards
Hello everyone,

This is an update of my own issue that now is solved.
Basically I tried everything in this thread and other sources to solve, but after thinking a bit I realized that in the "administrator" page in Joomla's dashboard there's a sections that says "Site Information" where the following information is showed:

OS
PHP
MySQ
Time
Caching
GZip
Users
Articles

The thing is that there it says the PHP version in which your Joomla site is running. For me was PHP 5.3.28, so I follow the instructions that are published here: http://docs.joomla.org/How_to_turn_off_ ... r_Joomla_3

And there select the last listed solution: Another solution (for the hosts where PHP is running as FCGI module), which is:

create a .user.ini file at your Joomla! root.
Add this content to the file and save

magic_quotes_gpc = Off

And it worked! Hope somebody can solve his issue with this, which took me a whole day to solve.

Cheers

User avatar
JAVesey
Joomla! Hero
Joomla! Hero
Posts: 2621
Joined: Tue May 14, 2013 1:21 pm
Location: Cardiff, Wales, UK
Contact:

Re: Magic Quotes GPC Off ?

Post by JAVesey » Sun Aug 24, 2014 1:05 pm

4commerce wrote:Hope somebody can solve his issue with this, which took me a whole day to solve.
As I think you've realised, it's not a Joomla issue.

Putting it simply, i.e. as I personally think it (so it's probably wrong!), "magic quotes" was deprecated in PHP5.3.x, i.e. set to be "off" in preparation to complete removal in PHP5.4.x - however with PHP5.3.x hosting companies have the option to re=enable it and many do/did so as not to break websites with ageing code on shared servers. This why it can be an issue with some sites running on PHP5.3.x but not for sites running on PHP5.4.x

PHP5.3.x has reached the end of the line and is no longer being developed. Unsurprisingly, being a modern and regularly updated package, Joomla is coded to work with modern server/php/MySQL platforms/configurations and so it's not surprising that Joomla 3.x requires "magic quotes" to be off as this in line with recent stable php releases. PHP5.4.x is not new......... PHP5.5.x is the current flagship.

My hosting company is one that is still on PHP5.3.27 and enabled "magic quotes" for the reason above; I had to turn it off manually using php.ini files (in site root and /administrator with a line in .htaccess too). Not a big deal.

Users are always (rightly) advised in these Forums to speak to their hosting company about disabling "magic quotes" as there is no "one solution fits all" method; only your hosting company knows for sure.

HTH
John V
Cardiff, Wales, UK
Joomla 5.0.3 "live" site on PHP 8.2.15 and MariaDB 10.11.7
Joomla 5.0.3 on XAMMP for OSX with PHP 8.2.4 and MariaDB 10.4.28

User avatar
brian
Joomla! Master
Joomla! Master
Posts: 12781
Joined: Fri Aug 12, 2005 7:19 am
Location: Leeds, UK
Contact:

Re: Magic Quotes GPC Off ?

Post by brian » Sun Aug 24, 2014 3:07 pm

That's absolutely correct John
"Exploited yesterday... Hacked tomorrow"
Blog http://brian.teeman.net/
Joomla Hidden Secrets http://hiddenjoomlasecrets.com/

User avatar
JAVesey
Joomla! Hero
Joomla! Hero
Posts: 2621
Joined: Tue May 14, 2013 1:21 pm
Location: Cardiff, Wales, UK
Contact:

Re: Magic Quotes GPC Off ?

Post by JAVesey » Sun Aug 24, 2014 3:59 pm

brian wrote:That's absolutely correct John
Crikey!!

Date noted in diary for future reference ;)
John V
Cardiff, Wales, UK
Joomla 5.0.3 "live" site on PHP 8.2.15 and MariaDB 10.11.7
Joomla 5.0.3 on XAMMP for OSX with PHP 8.2.4 and MariaDB 10.4.28

amallaki
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Tue Dec 10, 2013 10:33 am

Re: Magic Quotes GPC Off ?

Post by amallaki » Sat Sep 27, 2014 1:40 pm

Hi guys

I was wondering if any of you could help me out on this as well,
I followed the instruction on the documentation page, inserted the directive in my .htaccess file and also placed the relevant php directive in my php.ini file in the joomla root directory. In fact, it solved my problem, I checked my php info and confirmed that changes took effect.

However, for some reason, since the release of version 3.3.4, I've been getting the magic quote error for no particular reason, NB I hadn't upgraded from 3.3.3 to 3.3.4 before this happened. Just to double-check that my php settings hadn't changed, I checked the php info again and unsurprisingly they were still the same.

Has anyone had any similar experiences? This has been bugging me for the last couple of days a lot as I need to update the site content and also upgrade to the latest version, so if anyone could give any advice to rectify this, I'd be extremely grateful.


Thanks
Ali

User avatar
xfsgpr
Joomla! Ace
Joomla! Ace
Posts: 1099
Joined: Mon Feb 14, 2011 4:02 am
Location: London

Re: Magic Quotes GPC Off ?

Post by xfsgpr » Sat Sep 27, 2014 2:52 pm

amallaki wrote:Hi guys

I was wondering if any of you could help me out on this as well,
I followed the instruction on the documentation page, inserted the directive in my .htaccess file and also placed the relevant php directive in my php.ini file in the joomla root directory. In fact, it solved my problem, I checked my php info and confirmed that changes took effect.

However, for some reason, since the release of version 3.3.4, I've been getting the magic quote error for no particular reason, NB I hadn't upgraded from 3.3.3 to 3.3.4 before this happened. Just to double-check that my php settings hadn't changed, I checked the php info again and unsurprisingly they were still the same.

Has anyone had any similar experiences? This has been bugging me for the last couple of days a lot as I need to update the site content and also upgrade to the latest version, so if anyone could give any advice to rectify this, I'd be extremely grateful.


Thanks
Ali
It looks like you need to speak to your service provider like this guy did and his problem is solved once and for all.

sofloc
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Wed Oct 29, 2014 6:29 pm

Re: Magic Quotes GPC Off ?

Post by sofloc » Wed Oct 29, 2014 6:37 pm

I'm sorry, please just once again for a dummy: I look into the PHP folder (having installed php-5.3.29-Win32-VC9-x86.msi - the most recent installer version, not a zip-file) and there's already this file named php.ini. It has these lines in it:

; magic_quotes_gpc
; Default Value: On
; Development Value: Off
; Production Value: Off

So what do I do next?

User avatar
JAVesey
Joomla! Hero
Joomla! Hero
Posts: 2621
Joined: Tue May 14, 2013 1:21 pm
Location: Cardiff, Wales, UK
Contact:

Re: Magic Quotes GPC Off ?

Post by JAVesey » Wed Oct 29, 2014 7:01 pm

I guess that depends upon where the /php/ folder is ;)

Do you mean on a "live" webserver or do you mean on the local PC/Mac? If the latter, what package (WAMP?LAMP/MAMP/XAMPP) are you using to provide your website's local environment?
John V
Cardiff, Wales, UK
Joomla 5.0.3 "live" site on PHP 8.2.15 and MariaDB 10.11.7
Joomla 5.0.3 on XAMMP for OSX with PHP 8.2.4 and MariaDB 10.4.28

User avatar
JAVesey
Joomla! Hero
Joomla! Hero
Posts: 2621
Joined: Tue May 14, 2013 1:21 pm
Location: Cardiff, Wales, UK
Contact:

Re: Magic Quotes GPC Off ?

Post by JAVesey » Wed Oct 29, 2014 7:06 pm

amallaki wrote:if anyone could give any advice to rectify this, I'd be extremely grateful.
"Live" or local site?

If "live" then speak to your hosting company.

If "local" then have you updated your "localhost" package? I recently updated my MAMP PRO software and had the same issue. Had to edit the php version's php.ini file to turn off magic_quotes_gpc as the upgrade had overwritten the original php version/software.
John V
Cardiff, Wales, UK
Joomla 5.0.3 "live" site on PHP 8.2.15 and MariaDB 10.11.7
Joomla 5.0.3 on XAMMP for OSX with PHP 8.2.4 and MariaDB 10.4.28

sofloc
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Wed Oct 29, 2014 6:29 pm

Re: Magic Quotes GPC Off ?

Post by sofloc » Wed Oct 29, 2014 7:28 pm

JAVesey wrote:I guess that depends upon where the /php/ folder is ;)

Do you mean on a "live" webserver or do you mean on the local PC/Mac? If the latter, what package (WAMP?LAMP/MAMP/XAMPP) are you using to provide your website's local environment?
On my local PC, and I intended to install sql, php separately, only now I'm about to give it up and use Microsoft Web Patform Installer instead; it just makes me not sure what's really installed when it's done.

User avatar
JAVesey
Joomla! Hero
Joomla! Hero
Posts: 2621
Joined: Tue May 14, 2013 1:21 pm
Location: Cardiff, Wales, UK
Contact:

Re: Magic Quotes GPC Off ?

Post by JAVesey » Wed Oct 29, 2014 8:03 pm

If you're running Windows then take a look at WAMP or XAMPP instead.

These will install Apache, MySQL and php and give you a fully functional local web server environment. You should be able to choose which php version runs; choose the version closest to the php version on your "live" server if you want to replicate the "live" site.

I've used WAMP in the dim and distant past (use MAMP on an iMac now) and I recall that it worked well.
John V
Cardiff, Wales, UK
Joomla 5.0.3 "live" site on PHP 8.2.15 and MariaDB 10.11.7
Joomla 5.0.3 on XAMMP for OSX with PHP 8.2.4 and MariaDB 10.4.28

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 44019
Joined: Sat Apr 05, 2008 9:58 pm

Re: Magic Quotes GPC Off ?

Post by Webdongle » Wed Oct 29, 2014 9:03 pm

[quote="JAVesey"]If you're running Windows then take a look at WAMP or XAMPP instead..../quote]for various reasons xampp would probably be a better choice as a virtual host for PC with windows OS.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

sovainfo
Joomla! Exemplar
Joomla! Exemplar
Posts: 8808
Joined: Sat Oct 01, 2011 7:06 pm

Re: Magic Quotes GPC Off ?

Post by sovainfo » Wed Oct 29, 2014 9:15 pm

@sofloc Look for the next line: magic_quotes_gpc = Off

The lines you reported are comments and ignored, they are documentation, not active settings. Find the line mentioned above, it probably contains On instead of Off in your case. Change it to Off, save the file and restart apache to activate the setting.
Issue with migrating? Include logs/joomla_update.php in your report!
Blank screen? Verify pagesource for HTML code (javascript error)
Installation failing on populating database? Install with set_time_limit(0)
Document your customizations!

sofloc
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Wed Oct 29, 2014 6:29 pm

Re: Magic Quotes GPC Off ?

Post by sofloc » Thu Oct 30, 2014 7:50 am

@sovainfo, thanks, that's the spirit ;)

I now tried XAMPP actually, but it requires vacuuming every trace in the paths of previous mysql apparently so much so even in the end I still can't get it to run mysql.

Now as it happens since my new used laptop also has a screen-color issue so I can still choose some other hardware I think I'll do that instead and start all from true scratch :-) - thanks all!

pointbee
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Fri Jan 23, 2015 8:58 pm

Re: Magic Quotes GPC Off ?

Post by pointbee » Fri Jan 23, 2015 9:02 pm

Hello all,

I tryed everything to switch this damn magic off,

Solution that worked for me :

( i didnt notice that PHP is running as FCGI module on my host )

create a .user.ini file at your Joomla! root.

Add this content to the file and save

magic_quotes_gpc = Off

Voilà

emilio99
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sat May 02, 2015 7:06 pm

Re: Magic Quotes GPC Off ?

Post by emilio99 » Sat May 02, 2015 8:01 pm

Hello everyone, I'm new and I'm a beginner.
Today I went from version 2.5 to 3.4 of joomla but I have the problem "magic_quotes_gpc".
I tried all methods (htaccess, php.ini, user.ini)but with no success.
Can someone please help me? Thanks

p.s. my hosting use cpanel

User avatar
ribo
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3507
Joined: Sun Jan 03, 2010 8:47 pm
Contact:

Re: Magic Quotes GPC Off ?

Post by ribo » Sat May 02, 2015 10:44 pm

emilio99 wrote:Hello everyone, I'm new and I'm a beginner.
Today I went from version 2.5 to 3.4 of joomla but I have the problem "magic_quotes_gpc".
I tried all methods (htaccess, php.ini, user.ini)but with no success.
Can someone please help me? Thanks

p.s. my hosting use cpanel
Check first in your PHP Information your Server API and then you will find your php.ini method, otherwise your host will help you for sure
chat room spontes : http://www.spontes.com

wizarddesign
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 142
Joined: Sat Apr 28, 2012 3:20 pm

Re: Magic Quotes GPC Off ?

Post by wizarddesign » Fri Jul 03, 2015 5:31 am

I tried php.ini in every folder and also write the aforementioned line in .htaccess . it simply didn't work. however, I modified the core setup.php and quoted the check for magic quote part and all worked fine.
I just have one question; what Magic Quotes PGC do exactly that it should be turned off for installing joomla 3.4?
Isn't it a drawback for joomla users? seriously!? :pop
I am not saying I am a pro in joomla but I have been using it since joomla 1.5 . this is not good.

User avatar
ribo
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3507
Joined: Sun Jan 03, 2010 8:47 pm
Contact:

Re: Magic Quotes GPC Off ?

Post by ribo » Fri Jul 03, 2015 7:09 am

sohrab330 wrote:I tried php.ini in every folder and also write the aforementioned line in .htaccess . it simply didn't work. however, I modified the core setup.php and quoted the check for magic quote part and all worked fine.
I just have one question; what Magic Quotes PGC do exactly that it should be turned off for installing joomla 3.4?
Isn't it a drawback for joomla users? seriously!? :pop
I am not saying I am a pro in joomla but I have been using it since joomla 1.5 . this is not good.
Joomla 3.x requires magic_quotes_gpc off, so you must do it.
Not recommended from joomla to hack core files. just override
Now about the methods to change php values of php.ini or htaccess, every server configuration is different so and the methods are different, so if you don t know or you don t understand your server configuration it s better to ask your provider for your solution, for changing php values
chat room spontes : http://www.spontes.com

User avatar
brian
Joomla! Master
Joomla! Master
Posts: 12781
Joined: Fri Aug 12, 2005 7:19 am
Location: Leeds, UK
Contact:

Re: Magic Quotes GPC Off ?

Post by brian » Fri Jul 03, 2015 8:05 am

Just do EXACTLY what the message says SPEAK TO YOUR WEBHOST.

Any other advice is completely useless as it will 100% depend on the host

(magic_quotes_gpc is something that php used to support but it does not anymore - the fact that you even have magic_quotes_gpc available to be on shows that you are running a version of php that is dead, unsupported and with known vulnerabilities)
"Exploited yesterday... Hacked tomorrow"
Blog http://brian.teeman.net/
Joomla Hidden Secrets http://hiddenjoomlasecrets.com/

wizarddesign
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 142
Joined: Sat Apr 28, 2012 3:20 pm

Re: Magic Quotes GPC Off ?

Post by wizarddesign » Fri Jul 10, 2015 7:43 am

Thank you,
I upgraded my php version to the latest and it solved the problem as easy as pie

User avatar
ribo
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3507
Joined: Sun Jan 03, 2010 8:47 pm
Contact:

Re: Magic Quotes GPC Off ?

Post by ribo » Fri Jul 10, 2015 9:02 am

sohrab330 wrote:Thank you,
I upgraded my php version to the latest and it solved the problem as easy as pie
This is fixed for you because from php 5.4, magic_quotes_gpc has been removed.
Check http://php.net/manual/en/security.magicquotes.php
chat room spontes : http://www.spontes.com

davidgotham
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Fri Jul 31, 2015 12:05 pm
Location: United Kingdom
Contact:

Re: Magic Quotes GPC Off ?

Post by davidgotham » Fri Jul 31, 2015 12:16 pm

alikon wrote:from http://php.net/manual/en/security.magic ... abling.php
use of .htaccess is also an option
Thanks for the url mate


Locked

Return to “Installation Joomla! 3.x”