How to turn off magic_quotes_gpc
realwise said 2 years, 2 months ago:
I created a phpinfo file and it does show that magic_quotes_gpc is set to ON.
For the PHP program I’m trying to install on my website, I require it to be set to OFF. How can I do this on GoDaddy?
I have tried adding a line to the .htaccess file as I have found suggested on the web, but this causes a 500 error on my website.
Thanks for any help.
realwise said 2 years, 2 months ago:
Wow, I finally found a solution that works.
(1) First of all do not try to turn off the magic quotes in your .htaccess file, it won’t work on godaddy.
(2) Second, if you’re running PHP5 on your account, rename your php.ini file to php5.ini, make sure it’s in your root folder.
(3) Third, make sure all the lines in your php5.ini file end in a semi colon ;
(4) Fourth, add this line to your php5.ini file:
magic_quotes_gpc = Off;
Magic quotes gpc are now showing up as off in my phpinfo file and the program I’m installing now works.
JasonP said 2 years, 2 months ago:
@realwise,
Glad you got it to work, thanks for posting the info that helped you!
Jason
javanigus said 1 year, 10 months ago:
That didn’t work for me. What worked for me was
1. Leave php.ini as is (don’t rename it to php5.ini)
2. Make sure the following 3 (THREE) lines are in your php.ini (don’t just add the first line – you need all three)
magic_quotes_gpc = Off;
magic_quotes_runtime = Off;
magic_quotes_sybase = Off;
christianh said 1 year, 10 months ago:
@javanigus
Thanks for providing this feedback. I’m sure it will be useful for other members of the Community.
–Christian
scottdev said 1 year, 7 months ago:
Yes – the solution below worked for me:
(1) First of all do not try to turn off the magic quotes in your .htaccess file, it won’t work on godaddy.
(2) Second, if you’re running PHP5 on your account, rename your php.ini file to php5.ini, make sure it’s in your root folder.
(3) Third, make sure all the lines in your php5.ini file end in a semi colon ;
(4) Fourth, add this line to your php5.ini file:
magic_quotes_gpc = Off;
dmhayes said 1 year, 6 months ago:
This also worked for me. It also worked to set the {date.timezone = “America/Denver”} also.
(1) First of all do not try to turn off the magic quotes in your .htaccess file, it won’t work on godaddy.
(2) Second, if you’re running PHP5 on your account, rename your php.ini file to php5.ini, make sure it’s in your root folder.
(3) Third, make sure all the lines in your php5.ini file end in a semi colon ;
(4) Fourth, add this line to your php5.ini file:
magic_quotes_gpc = Off;
sabine51 said 1 year, 4 months ago:
I tried everything what you expalined, but nothing works. I have a shared server with godaddy. At my root folder are two php.ini files (php.ini and php5.ini) At php.ini > rg_emulation=off At php5.ini > zend_extension = /var/chroot/home/content/s/a/b/sabine/html/ioncube/ioncube_loader_lin_5.2.so I add magic_quotes_gpc = Off; BUT nothing happened. Still the same answer when I try to install open realty: You have “magic_quotes_gpc” actually set to “ON” at your server while you should have it set to “OFF”. I fell like crazy. Please help
chrisg said 1 year, 4 months ago:
@sabine51,
I believe you had posted similar inquiries in the following community thread which were recently addressed:
http://support.godaddy.com/groups/dedicated-linux/forum/topic/magic_quotes_gpc/
Christopher G.
designedbysara said 1 year, 2 months ago:
@realwise you are awesome! I searched high and low and tada… your suggestion worked! Brilliant!! Thank you so much.
chrisg said 1 year, 2 months ago:
@designedbysara,
I am glad to hear that the information provided in this thread was useful to you. Let us know if you have any other questions.
Christopher G.
urbo1991 said 1 year ago:
None of this work for me…
What’s the real sollution?
anonymous007 said 1 year ago:
After the above changes you have to go:
- Hosting Control Panel
- Content
- System Processes
- End Web button
Src: http://www.unchi.co.uk/2011/06/09/disabling-magic-quotes-in-php-on-godaddy/
chrisg said 1 year ago:
@anonymous007,
Thank you for bringing up this information. This should be beneficial to other members encountering issues with the disabling Magic Quotes.
Christopher G.
dumbsearch said 1 year ago:
I need help!
I did basically what “realwise” said, and now phpinfo.php shows that magic quotes are off. It says so, but all the get and post forms with “‘” get to “/’”! So it must be still on! How do I fix that?
5 min expected wait time