Importing Apache access log to ezview_counter

Author Message

Eivind Marienborg

Friday 04 March 2005 12:35:31 am

I'm trying to set up a list of the most viewed nodes on my site, using view_top_list (http://ez.no/ez_publish/documentation/reference/data_fetching/content/view_top_list).

I've run the cronjob importing the access_log, the script runs for quite some time, but when it's done there's no entries in table ezview_counter (that I assume stores the stats), and nothing's outputted through view_top_list.

I'm sure the cronjob finds the file (because of the time it takes to run the script through). This is the output:

Running cronjob part 'log'
Running cronjobs/updateviewcount.php
Update content view count ...
Started at 04. mars 2005 09:15:56

Start line:

Finished at 04. mars 2005 09:16:09

View count have been updated!

No errors, but no start line either.

I haven't found any docs on this.. Does the access_log need a specific format for the script to work? Are there other things that might mess this up? Any help or hint is greatly appriciated :)

- Eivind

Łukasz Serwatka

Friday 04 March 2005 12:51:11 am

Hi Eivind,

Try to create dir "log" in your var/(cache_dir)/ and run your cronjobs script.

Make sure that you add correct path to your apache log file. PHP should have read access to this file.

I hope it will help.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Eivind Marienborg

Friday 04 March 2005 1:17:53 am

Thanks for quick reply, and congrats on the system crew status :)

I assume the path is correct, simply because it takes longer to run now then if I enter a obviously wrong path.

There's already a var/log directory. But there's no updateview.log created. Could this mean that php doesn't have write access here? And should that really matter - Should it fail just because it can't write the log?

This is a line from the access log, could there be anything wrong with it? (IP altered for privacy reasons)

0.0.98.76 - - [04/Mar/2005:09:09:31 +0100] "GET /siteaccess/content/view/full/27370 HTTP/1.0" 200 19944

Łukasz Serwatka

Friday 04 March 2005 1:21:35 am

Hi Eivind,

Thank you. Try create "log" dir in your var/(prefix)/. For example /var/news/log not in var because there already exists log dir as you wrote.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Eivind Marienborg

Friday 04 March 2005 1:29:52 am

Great! :) At least it creates the log now, and skips the parts it has already parsed. But it still doesn't insert anything into DB. Can I enable a debug mode for this script some how?

Stéphane Bullier

Monday 16 April 2007 5:01:18 am

Hello,

I try to make fetch of 'view_top_list'. When I run "runcronjobs" manually with -d option, there is this message :

Timing: ()
Script cronjobs/updateviewcount.php starting

Warning: (PHP)
Undefined offset:  1 in /usr/home/usr2/ezpublish-3.9.0/cronjobs/updateviewcount.php on line 117

Warning: (PHP)
Undefined offset:  1 in /usr/home/usr2/ezpublish-3.9.0/cronjobs/updateviewcount.php on line 118

Warning: (PHP)
Undefined offset:  1 in /usr/home/usr2/ezpublish-3.9.0/cronjobs/updateviewcount.php on line 122

Warning: (PHP)
Undefined offset:  1 in /usr/home/usr2/ezpublish-3.9.0/cronjobs/updateviewcount.php on line 124

Timing: ()
Script cronjobs/updateviewcount.php done

How is possible to correct this ?

Stéphane

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.