Eventlog not recording events

Once you've installed phpList Version 2... ask questions here!
Forum rules
Please help the volunteers to help you by supplying the version of phpList you are using, browser & version and if possible, a link to your phpList installation. This is for Version 2 of phpList (the orange one).

Eventlog not recording events

Postby lostndazed » 4:16pm, Mon 26 Feb, 2007

Hello,

My eventlog doesn't seem to be putting data into the db. Is there a setting somewhere that turns it on?
And if so, where can I find it?

If there is no setting, is there another solution?
Everything else seems to be connecting to the db fine.
I've got version 2.10.4.

Thank you.
lostndazed
phpLister
 
Posts: 10
Joined: 4:09pm, Mon 26 Feb, 2007

Postby lostndazed » 5:23pm, Mon 26 Feb, 2007

Is version 2.10.4 missing a file?
I just did a search for "eventlog" across all the files, and I can't find one place of mySQL INSERT for eventlog.
lostndazed
phpLister
 
Posts: 10
Joined: 4:09pm, Mon 26 Feb, 2007

Postby lostndazed » 5:33pm, Mon 26 Feb, 2007

Ok I found the code that is supposed to insert the events into eventlog.

on lib.php

Code: Select all
function logEvent($msg) {
  global $tables;
  if (isset($GLOBALS['page'])) {
    $p = $GLOBALS['page'];
  } elseif (isset($_GET['page'])) {
    $p = $_GET['page'];
  } elseif (isset($_GET['p'])) {
    $p = $_GET['p'];
  } else {
    $p = 'unknown page';
  }
  if (Sql_Table_Exists($tables["eventlog"]))
  Sql_Query(sprintf('insert into %s (entered,page,entry) values(now(),"%s","%s")',$tables["eventlog"],
    $p,addslashes($msg)));
}


I guess that looks right. So am back to:
How do I make it record events in my eventslog table?
lostndazed
phpLister
 
Posts: 10
Joined: 4:09pm, Mon 26 Feb, 2007

Postby lostndazed » 6:01pm, Mon 26 Feb, 2007

And yes, the table is in my DB.

Table: phplist_eventlog

Code: Select all
Field    Type         etc.
id    int(11)      etc.
entered datetime     etc.
page    varchar(100) etc.
entry   text         etc.


The table is greyed out, though, 'cause there's no data in it.
lostndazed
phpLister
 
Posts: 10
Joined: 4:09pm, Mon 26 Feb, 2007

Postby lostndazed » 9:58pm, Mon 26 Feb, 2007

Found the answer all by myself, but will post here in case someone else is having the same issue.

In the config/config.php file, on LINE 288, if I want the eventlog to work, then I need to set this to:

Code: Select all
define ("NOSTATSCOLLECTION",0);


To turn off the eventlog, then I would put:
Code: Select all
define ("NOSTATSCOLLECTION",1);
lostndazed
phpLister
 
Posts: 10
Joined: 4:09pm, Mon 26 Feb, 2007


Return to Question & Problems - after installing

Who is online

Users browsing this forum: No registered users and 12 guests

cron