zlgo Posted March 27, 2007 Share Posted March 27, 2007 Hi all, I just wanted to make it clear on how to get rid of magic quotes on your server forever! Because i know how annoying it is for developers having to get rid of all those backslashes and knowing the risk of mysql injection. How to Do it Simple! All you have to do is find a file called php.ini on you server somewhere (my ubuntu server's php.ini was "/etc/php5/apache2/php.ini") and edit it. So first open a terminal. Then (for ubuntu users) type "sudo nano " and then the location of the php.ini (e.g. /etc/php5/apache2/php.ini ) For other linux systems like gentoo or SuSe use you need to type: "su" press enter (type your password when it asks) and then: "nano" and then the location of the php.ini like above. Now you need to change a certain text, but this php.ini file is pretty big so you need to press CTRL+W and then type "magic" and press enter. You appear in the section labelled "Magic Quotes". Now there should be some text that says "magic_quotes_gpc = On". This needs to be changed if you want magic quotes off. So you simply change "On" to "Off" (Keep it case sensitive). Now press CTRL+X, type y and press enter. If that went ok then all you have to do now is reboot so when php reloads itself it will find that magic quotes are now turned off and you never have to worry about them again! Link to comment https://forums.phpfreaks.com/topic/44481-solved-howto-disableturn-off-magic-quotes-with-apache2-linux/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.