note 117226 added to function.get-magic-quotes-gpc

From: Date: Wed, 06 May 2015 00:01:54 +0000
Subject: note 117226 added to function.get-magic-quotes-gpc
Groups: php.notes 
Request: Send a blank email to php-notes+get-202447@lists.php.net to get a copy of this message
> "If the directive magic_quotes_sybase is ON it will completely override > magic_quotes_gpc." This "note" is a bit misleading. magic_quotes_sybase will only override the escaping method used on Get/Post/Cookie data if magic_quotes_gpc is already enabled. If magic_quotes_gpc is not enabled then magic_quotes_sybase will have no effect here. A few of the other comments are therefore incorrect in determining when to "stripslashes" from the input, by "stripping slashes" when either magic_quotes_gpc OR magic_quotes_sybase is enabled. You should only stripslashes() when magic_quotes_gpc is enabled since that is the only time when slashes are automatically added. stripslashes() is also magic_quotes_sybase aware, so you don't need to do anything special (ie. write a custom function to handle this situation as another comment suggests) when magic_quotes_sybase is enabled. When magic_quotes_sybase is enabled, stripslashes() does not actually strip any slashes, but instead unescapes single-quotes that are escaped with single-quotes only. magic_quotes_sybase does however influence the escaping (and unescaping) method used by addslashes() and stripslashes() respectively, regardless of whether magic_quotes_gpc (or magic_quotes_runtime) is enabled. ---- Server IP: 72.52.91.14 Probable Submitter: 86.183.92.64 ---- Manual Page -- http://php.net/manual/en/function.get-magic-quotes-gpc.php Edit -- https://master.php.net/note/edit/117226 Del: integrated -- https://master.php.net/note/delete/117226/integrated Del: useless -- https://master.php.net/note/delete/117226/useless Del: bad code -- https://master.php.net/note/delete/117226/bad+code Del: spam -- https://master.php.net/note/delete/117226/spam Del: non-english -- https://master.php.net/note/delete/117226/non-english Del: in docs -- https://master.php.net/note/delete/117226/in+docs Del: other reasons-- https://master.php.net/note/delete/117226 Reject -- https://master.php.net/note/reject/117226 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#202447) next »