|
From: Reini U. <ru...@x-...> - 2007-08-15 06:48:37
|
RubyCon schrieb:
> Sorry, I searched in the wrong direction. Forget my 1. posting .. I'm sorry.
> The error still appears:
> ib/WikiDB/backend/PearDB.php:1059 Error: WikiDB_backend_PearDB_mysql: fatal
> database error
>
> * DB Error: value count on row
> * (INSERT INTO accesslog
> (time_stamp,remote_host,remote_user,request_method,request_line,request_uri,request_args,request_time,status,bytes_sent,referer,agent,request_duration)
> VALUES (1187156181,'xxx.xxx.xxx','-','GET','GET /quicky/
> HTTP/1.0','/quicky/','','15/Aug/2007:07:36:21 0200',200,7800,'','Mozilla/5.0
> (Windows; U; Windows NT 5.1; de; rv:1.8.1.6) Gecko/20070725
> Firefox/2.0.0.6',1,2147881984711) [nativecode=1136 ** Column count doesn't
> match value count at row 1])
>
> What is going wrong here ? PHP Version is 5.1.6 , MySQL is 5.0.22 on
> Scientific Linux 5.
Ok, your system looks sane, just european.
The error is the request_duration as 1,2147881984711
It should be 1.2147881984711
Know problem with PEAR DB quoting. ? should be escape floats with ,
// duration problem: sprintf "%f" might use comma e.g. "1,201" in
european locales
The fix is
function setDuration ($seconds) {
// Pear DB does not correctly quote , in floats using ?. e.g.
in european locales.
// Workaround:
$this->duration = strtr(sprintf("%f", $seconds),",",".");
}
in Request.php
--
Reini Urban
http://phpwiki.org/ http://murbreak.at/
http://helsinki.at/ http://spacemovie.mur.at/
|