Re: PHP weirdo bahavior (code mutation)
| From: | Mohamed Lrhazi | Date: | Fri, 10 Oct 2003 23:59:52 +0000 |
| Subject: | Re: PHP weirdo bahavior (code mutation) | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-165815@lists.php.net to get a copy of this message | ||
Thanks Khalid... but that still does not help :)
The problem does not reproduce systematically, at all.. here is another
example I just found in a new log of my script:
Here is my code first:
$table="client_package";
$sql = "INSERT INTO
$table
(cp_id,client_id,pack_id,pack_price,parent_cp_id,cp_start_stamp,
cp_renew_stamp,cp_billing_cycle,cp_status,cp_comments,cp_renewed_on,cp_stamp,aff_code,
aff_last_paid,domain,ip,server,username,password)
VALUES(NULL,'$client_id','$pack_id','$price',NULL,'$domain_created',
'$domain_expires','$bcycle','$cp_status',NULL,'$domain_created','$cp_stamp',NULL,
NULL,NULL,NULL,NULL,NULL,NULL) ";
$result = $db_mbill->query($sql);
if (DB::isError($result)) {
mylog(__FUNCTION__ . ":" ."[MbillClientID: $client_id]:" ."sql was:
$sql ");
mylog(__FUNCTION__ . ":" ."[MbillClientID: $client_id]:" .
$result->getMessage());
return false;
}else{
mylog(__FUNCTION__ . ":" ."[MbillClientID: $client_id]:"
."Successfully added pkg Domain Registration [$domain_name]");
}
Now here the log, again this does not happen systematically, often the
code works... but when it does not, it s very weirdo :
__FUNCTION__:[MbillClientID: 4135]:sql was: INSERT INTO client_package
(cp_id,client_id,pack_id,pack_price,parent_cp_id,cp_start_stamp,
cp_renew_stamp,cp_billing_cycle,cp_status,cp_comments,cp_renewed_on,cp_stamp,aff_code,
XI~E^H^U^@^@^@invalid date or
time^@,server,username,password`)
VALUES(NULL,'4135','12','0',NULL,'1038200400',
'1069736400','12','2','','1038200400','1065728768',NULL,
^U^@^@^@no database selected^@NULL)
__FUNCTION__:[MbillClientID: 4135]:DB Error: syntax error
Any ideas?
Mohamed~
On Fri, 2003-10-10 at 16:03, Burhan Khalid wrote:
> Mohamed Lrhazi wrote:
>
> > 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' ";
>
> Try $sql = "SELECT * FROM ".$table_customer." WHERE id =
> '".$id."'";
> and see if you get the same error. If you are using MSSQL, I think that
> [ ] are optional, but I could be mistaken.
>
> [ snip ]
>
>
> --
> Burhan Khalid
> phplist[at]meidomus[dot]com
> http://www.meidomus.com