MySQL Forums
Forum List  »  PHP

Re: MySQL is auto escaping all commands
Posted by: Peter Brawley
Date: April 14, 2018 11:00AM

It's not MySQL. It's a PHP setting controlled by your web host, very likely magic_quotes_gpc, see http://php.net/manual/en/security.magicquotes.php.

It was deprecated in PHP 5,3, removed in PHP 5.4. I would not use a web host that sets it.

For several reasons database data does need to be escaped. As that PHP doc page explains, though, the one-size-fits-all approach of magic_quotes_gpc() does not fit all. Until you can move to host, you'll have to write code to compensate for their setting.



Edited 1 time(s). Last edit at 04/14/2018 02:03PM by Peter Brawley.

Options: ReplyQuote


Subject
Written By
Posted
Re: MySQL is auto escaping all commands
April 14, 2018 11:00AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.