PHP weirdo bahavior (code mutation)
| From: | Mohamed Lrhazi | Date: | Fri, 10 Oct 2003 19:16:01 +0000 |
| Subject: | PHP weirdo bahavior (code mutation) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-165780@lists.php.net to get a copy of this message | ||
Hello all,
I am using a PHP application called modernbill, which uses iocube
encoder... PHP very frequently dies with SIG fault... 4.3 dies
systematically
While working on this problem I stumbled on this behavior :
In my code, I have something like this:
$table_customer="customer";
$sql="select * from [$table_customer] where [id] = '$id' ";
$result = $db_plat->query($sql);
if (DB::isError($result)) {
mylog(__FUNCTION__ . ":" . "sql was: $sql ");
mylog(__FUNCTION__ . ":" . $result->getMessage());
return false;
}else{
$row = $result->fetchRow(DB_FETCHMODE_ASSOC);
}
Well, sometimes, at least twice I noticed it, sometimes I get this in my
log file:
sql was: select * fro?2351ERROR_RETURNd_????id] = '2351'
DB Error: Syntax error.
There are binary chars after the "select * fro"
How could that possibly happen? Who changed my code?
Thanks for any input.
Mohamed~