#573 Fatal error inserting accesslog

Database
closed
Reini Urban
MySQL (31)
5
2012-10-11
2007-07-08
Paul Sinnema
No

Hi,

I'm new to phpWiki. I've downloaded and installed phpWiki. During execution I constantly get the following fatal error on an insert of an accesslog entry.

lib\WikiDB\backend\PearDB.php:1059 Error: WikiDB_backend_PearDB_mysql: fatal database error

Disabeling the lines 443 - 444 in Request.php stop the error from happening. Is it a bug or something wrong in my installation?

Paul.


       // if (isset($this->_accesslog->logtable))
       //     $this->_accesslog->write_sql();

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 (1183912710,'127.0.0.1','-','GET','GET /phpWiki/index.php/TestPage HTTP/1.1','/phpWiki/index.php/TestPage','','08/Jul/2007:18:38:30 0200',200,6922,'http://localhost/phpWiki/index.php/RecentChanges','Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Avant Browser; .NET CLR 1.1.4322; InfoPath.1; .NET CLR 2.0.50727)',0,80227613449097) [nativecode=1136 ** Column count doesn't match value count at row 1])

Discussion

  • Paul Sinnema
    Paul Sinnema
    2007-07-08

    Logged In: YES
    user_id=103536
    Originator: YES

    PS: Version = 1.3.1.4

     
  • Reini Urban
    Reini Urban
    2007-07-14

    Logged In: YES
    user_id=13755
    Originator: NO

    The problem is that the float duration is written as "0,80227613449097" and not as "0.80227613449097". Another PearDB bug.

    Does it help if you change line 1055 in lib/Request.php to
    $this->duration = strtr(sprintf("%.8f", $seconds),",",".");

     
  • Reini Urban
    Reini Urban
    2007-08-20

    Logged In: YES
    user_id=13755
    Originator: NO

    Fixed in CVS with lib/Request.php rev 1.114