php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #20384 magic_quotes_sybase = on sorta turns magic_quotes_gpc off
Submitted: 2002-11-12 04:06 UTC Modified: 2003-01-19 15:21 UTC
From: philip at cornado dot com Assigned: philip (profile)
Status: Closed Package: Documentation problem
PHP Version: 4CVS-2002-11-11 OS: all
Private report: No CVE-ID: None
 [2002-11-12 04:06 UTC] philip at cornado dot com
With the following configuration:

magic_quotes_sybase = on
magic_quotes_gpc    = on 

Currently (as of php4.3.0-dev) the following behavior exists:

a) Makes GPC foo's into foo''s (as advertised)
b) Doesn't touch foo"s, foo"s remains foo"s.  The same can be said for \ and NUL's as they are unaffected by magic_quotes_gpc when _sybase is On!

In summary, _sybase takes over _gpc and only ' are escaped.  The rest remain untouched as if _gpc is off.  This behavior is unexpected to me as I would still expect magic_quotes_gpc to affect ", \ and NUL's.  get_magic_quotes_gpc() still returns true even when ", \ and NUL's are not escaped, this seems odd.  I haven't seen one quotes management solution out there in phpland that takes into account _sybase so am a little worried.

Proposal:

If both _gpc and _sybase are On:

a) foo's turns to foo''s as advertised (like current)
b) magic_quotes_gpc will still affect everything else except single quotes, with backslashes.

Regarding BC. I'm not sure if this change will affect BC nor am I all that familiar with Sybase or character escaping in general so please comment.  I vote the above proposal is discussed and if approved implemented into PHP 4.3.0

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-12 05:50 UTC] sander@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php


 [2002-11-12 06:00 UTC] sniper@php.net
reclassified.


 [2003-01-19 15:21 UTC] philip@php.net
This is documented now.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Aug 03 11:00:03 2025 UTC