Current User: Guest Login
Please consider registering


Lost Your Password?

Search Forums:


 






Minimum search word length is 4 characters – Maximum search word length is 84 characters
Wildcard Usage:
*  matches any number of characters    %  matches exactly one character

Trouble with "Hits on Images"

Reply to Post Add a New Topic
UserPost

1:40 pm
January 5, 2010


Drew Wrobel

Guest

I’m having a bit of trouble with the code at Hits on Images.

While I get a new section ‘Hits on Images’, I am not getting any results listed.

Did I copy the code incorrectly?  I updated the search to include bitmaps ( bmp ) files as well.

ExtraSectionName1=”Hits on Images”
ExtraSectionCodeFilter1=”200 304″
ExtraSectionCondition1=”URL,\\.(png|gif|jpe?g|bmp)$”
ExtraSectionFirstColumnTitle1=”Image”
ExtraSectionFirstColumnValues1=”URL,^(\\/.*\\.(png|gif|jpe?g|bmp))$”
ExtraSectionFirstColumnFormat1=”<A HREF='http://172.21.100.6[64]%s&#39; TARGET='_blank'>%s</A>”
ExtraSectionStatTypes1=HBL
ExtraSectionAddSumRow1=1
MaxNbOfExtra1=20
MinHitExtra1=1

Here is a copy of a URL from the access log ( the log is from my squid caching server ):

pepboys.com 69.118.154.32 – – [05/Jan/2
010:05:54:59 -0500] “GET http://172.21.
100.64/images/uploads/mmj_heads_org.gif
 HTTP/1.1? 200 2657 “http://pepboys.com
/” “Mozilla/4.0 (compatible; MSIE 8.0;
Windows NT 5.1; Trident/4.0; GTB6.3; .N
ET CLR 1.0.3705; .NET CLR 1.1.4322; Med
ia Center PC 4.0)” TCP_MEM_HIT:NONE

2:02 pm
January 5, 2010


Jean-Luc

Admin

posts 1125

It does not work because the above value of ExtraSectionFirstColumnValues1  demands that the URL starts with a slash.

Try this :

ExtraSectionFirstColumnValues1="URL,^(.
*)$"
ExtraSectionFirstColumnFormat1="<A HREF
='%s' TARGET='_blank'>%s</A>"

2:34 pm
January 5, 2010


Drew Wrobel

Guest

I tried the above and it seems to work.

I got the following error message though after I updated the awstats config file:

Create/Update database for config “/etc/awstats/awstats.daily.conf” by AWStats version 6.95 (build 1.943)
From data in log file “/var/lib/awstats/logs/access.log-20091128″…
Phase 1 : First bypass old records, searching new record…
Direct access to last remembered record has fallen on another record.
So searching new records from beginning of log file…
Phase 2 : Now process new records (Flush history on disk after 20000 hosts)…
Error: The number of values found for extra section 1 has grown too large.
In order to prevent awstats from using an excessive amount of memory, the number
of values is currently limited to 500
. Perhaps you should consider
revising extract parameters for extra section 1. If you are certain you
want to track such a large data set, you can increase the limit by setting
ExtraTrackedRowsLimit in your awstats configuration file.

The size of the log file was about 1.4GB for that day.  So I'm not suprised about the amount of information.

Here is the updated rules I have:

ExtraSectionName1=”Hits on Images”
ExtraSectionCodeFilter1=”200 304″
ExtraSectionCondition1=”URL,\.(png|gif|jpe?g|bmp)$”
ExtraSectionFirstColumnTitle1=”Image”
ExtraSectionFirstColumnValues1=”URL,^(.*)$”
ExtraSectionFirstColumnFormat1=”<A HREF='%s' TARGET='_blank'>%s</A>”
ExtraSectionStatTypes1=HBL
ExtraSectionAddSumRow1=1

MaxNbOfExtra1=20

MinHitExtra1=1

Should I redo the ExtraSectionFirstColumnValues1 to be more specific?

9:49 pm
January 5, 2010


Jean-Luc

Admin

posts 1125

You can also try to change the maximum value in the AWStats config file. Edit this line this line according to your needs :

ExtraTrackedRowsLimit=500

4:07 pm
January 7, 2010


Drew Wrobel

Guest

Thanks….that did the trick.

I took the code to make a "Hits on HTML" that doesn't appear to be working.

I'll post that in a seperate topic.

6:38 pm
June 17, 2010


Darren

Guest

I am having similar issues as others in this post.  I have tried all of the above and nothing seems to work.  I am using version 6.95.  The section shows up but no data.  Any suggestions?  Thanks!

6:52 pm
June 17, 2010


Darren

Guest

Never mind, after reinitializing a fresh site with changes it works.

3:16 pm
April 11, 2011


Quentin

Guest

Hi,

I'm getting the same error, I saw the section, nothing inside – if I go to my WHM manager, and I do a sycnh

the Hit on Image just disapear

 

if I'm checking my conf the code didnt appeard anymore,

 

file that I edit:

 

vi /home/hosting/tmp/awstats/awstats.hostingrq.com.conf

code that I enter:

ExtraSectionName1="Hits on Images"

ExtraSectionCodeFilter1="200 304"

ExtraSectionCondition1="URL,\.(png|gif|jpe?g)$"

ExtraSectionFirstColumnTitle1="Image"

ExtraSectionFirstColumnValues1="URL,^(\/.*\.(png|gif|jpe?g))$"

ExtraSectionFirstColumnFormat1="< A HREF='http ://w ww.your_site.com%s' TARGET='_blank'>%s</A>"

ExtraSectionStatTypes1=HBL

ExtraSectionAddSumRow1=1

MaxNbOfExtra1=10

MinHitExtra1=1

 

I'm in need of tracking an image.

 

thanks

3:57 pm
April 11, 2011


Quentin

Guest

Ok never mind, I've found the problem – I have put the config file as chmod 444 (read only)

thanks for your help here

3:29 pm
April 18, 2011


Jean-Luc

Admin

posts 1125

Thanks for letting us know that you found the solution. We explain this permission issue in Changing AWStats Config File in cPanel.

Reply to Post

Reply to Topic:
Trouble with "Hits on Images"

Guest Name (Required):

Guest Email (Required):

NOTE: New Posts are subject to administrator approval before being displayed

Smileys
Confused Cool Cry Embarassed Frown Kiss Laugh Smile Surprised Wink Yell
Post New Reply

Guest URL (required)

Math Required!
What is the sum of:
3 + 9
   


About the InternetOfficer.com Forum

Forum Timezone: UTC 1

Most Users Ever Online: 302

Currently Online:
17 Guests

Currently Browsing this Topic:
1 Guest

Forum Stats:

Groups: 2
Forums: 9
Topics: 639
Posts: 2710

Membership:

There are 257 Members
There have been 304 Guests

There is 1 Admin
There is 1 Moderator

Top Posters:

cssfsu – 55
deepakgupta – 34
albert_newton – 30
cosminpana – 20
DTNMike – 19
ahtshun83 – 17

Recent New Members: raju, todd2taylor, sbdcunha, mansigill1987, ThomasDuh, ThomasKic

Administrators: Jean-Luc (1125 Posts)

Moderators: Jean-Luc (1125 Posts)