php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2547 ereg_replace always do (\') in string replacement but not (')
Submitted: 1999-10-16 18:58 UTC Modified: 1999-10-16 20:22 UTC
From: aqlott at maruko dot stic dot gov dot tw Assigned:
Status: Closed Package: MySQL related
PHP Version: 4.0 Beta 2 OS: Redhat 6.0
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: aqlott at maruko dot stic dot gov dot tw
New email:
PHP Version: OS:

 

 [1999-10-16 18:58 UTC] aqlott at maruko dot stic dot gov dot tw
the php source I used for version 3 will no longer work
for version4, after the trace/debug, I just realize the
ereg_replace just behave a little different.

It will automatically add backslash in front of the 
quote symbol, no matter I want it or not.

for instance, if I want a query string like
"name like 'bob%'" it will turn out 
"name like \'bob%\'" and my mysql engine just
cannot return the stuff I want

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-10-16 20:22 UTC] andrei at cvs dot php dot net
Check your magic_quotes_runtime setting. I believe this is
what's causing it.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 10 15:01:35 2024 UTC