Forums / General / Importing Apache access log to ezview_counter

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

eZ debug

Timing: Jan 19 2025 10:01:48
Script start
Timing: Jan 19 2025 10:01:48
Module start 'content'
Timing: Jan 19 2025 10:01:49
Module end 'content'
Timing: Jan 19 2025 10:01:49
Script end

Main resources:

Total runtime0.8162 sec
Peak memory usage4,096.0000 KB
Database Queries205

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0073 589.0781180.8203
Module start 'content' 0.00730.6770 769.8984630.3359
Module end 'content' 0.68440.1318 1,400.2344341.0625
Script end 0.8161  1,741.2969 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00450.5481210.0002
Check MTime0.00170.2060210.0001
Mysql Total
Database connection0.00100.123910.0010
Mysqli_queries0.728289.21432050.0036
Looping result0.00240.28982030.0000
Template Total0.786696.420.3933
Template load0.00210.258920.0011
Template processing0.784596.115620.3923
Template load and register function0.00010.016210.0001
states
state_id_array0.00100.127710.0010
state_identifier_array0.00080.093620.0004
Override
Cache load0.00180.2181370.0000
Sytem overhead
Fetch class attribute can translate value0.00160.195940.0004
Fetch class attribute name0.00120.140990.0001
XML
Image XML parsing0.00210.256640.0005
class_abstraction
Instantiating content class attribute0.00000.0032120.0000
General
dbfile0.00380.4704410.0001
String conversion0.00000.000730.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
6content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 25
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs