#21851 [Com]: bizarre!: status replaced with foo1 or nothing
| From: | php at glaciersoftware dot com | Date: | Thu, 26 Jun 2003 00:57:12 +0000 |
| Subject: | #21851 [Com]: bizarre!: status replaced with foo1 or nothing | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-42521@lists.php.net to get a copy of this message | ||
ID: 21851
Comment by: php at glaciersoftware dot com
Reported By: keith at lucidts dot com
Status: Closed
Bug Type: Scripting Engine problem
Operating System: debian linux
PHP Version: 4.3.0
New Comment:
I'd like to bring this issue up again as I've ran into it many times
when dealing with the creating of SQL statements which evaluate a
common database/table/column called "status". Below is the error report
and how to duplicate it.
Problem
=======
For some unknown reason, the PHP scripting engine seems to replacing
the word "status" with "foo1"
when an equal-sign, 0x3d, appears within 6 characters of the word
"status".
Bug was reported on http://bugs.php.net as Bug #21851, but status
was
changed to CLOSED after
someone was not able to duplicate the problem.
Environment
===========
The following webservers were used to test the below code for the
existance of this problem:
PHP 4.2.1 with Apache/1.3.24 running on Linux 2.4.18-3 RedHat 7.3
PHP 4.3.1 with Apache/2.0.43 running on Linux 2.4.20-18.8 RedHat 8.0
Code
====
The following code should replicate the problem. The "<br>\n" appended
to the echo() call is used
only for readability, the problem will still exist without this string
added.
***** START PHP FILE ******
<?php
// *** Note the 6 spaces, 0x20, between the word status and the
equal-sign
// *** the word "status" will be replaced with "foo1"
$buf = "status = 'C' ";
echo($buf . "<br>\n");
// *** The number of spaces has been changed from 6 to 7
// *** now it doesn't replace "status" with "foo1"
$buf = "status = 'C' ";
echo($buf . "<br>\n");
?>
***** END PHP FILE ********
Previous Comments:
------------------------------------------------------------------------
[2003-01-27 22:46:54] keith at lucidts dot com
can't figure this one out ... but i'm closing it b/c it appears to be a
windows problem and/or virus and/or someone having fun at my expense
... i can't reproduce it only any other platform and only on computers
that i have been using recently ...
------------------------------------------------------------------------
[2003-01-24 03:27:06] sniper@php.net
Try changing your error_reporting to E_ALL and you'll
see the problem.
And what use is it to have empty name for select tag?
------------------------------------------------------------------------
[2003-01-24 03:26:50] keith at lucidts dot com
derick in your email that i received when you posted i could see
<select name='s t a t u s' size="1">
using squirrelmail ... a php imap client
BUT browsing this thread online (same computer and same browser as the
imap client, XP home and IE respectively) ... no "s t a t u s"!
anyone browsing this thread on a mac using IE perchance?
------------------------------------------------------------------------
[2003-01-24 03:19:32] keith at lucidts dot com
update ...
ok this may not be a php problem afterall ... although i can reproduce
it on every windows machine i've tried but on every lynx and conquerer
it comes out as expected ... the mystery continues ....
additional note ... i've tried with both netscape and ie on xp and 98
problem persists from 4 different computers (2 at the office 2 at home)
------------------------------------------------------------------------
[2003-01-24 03:06:41] derick@php.net
Looks fine here:
<select name='status' size="1">
Derick
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/21851
--
Edit this bug report at http://bugs.php.net/?id=21851&edit=1