Hit Counter

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
Barrowboy
Forum Members
Forum Members
Posts: 223
Joined: Mon Dec 16, 2013 4:09 pm

Hit Counter

Post by Barrowboy »

Would any one know if the hit counter will work correctly on the latest issue 2.2.15

Thanks
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1609
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: Hit Counter

Post by DIGI3 »

It does still work, but it and its dependency (CGExtensions) have both been abandoned by their developer, so probably best not to be relied upon. You may want to fork it (or hire someone to) and set its dependency to use CMSExt.
Not getting the answer you need? CMSMS support options
Barrowboy
Forum Members
Forum Members
Posts: 223
Joined: Mon Dec 16, 2013 4:09 pm

Re: Hit Counter

Post by Barrowboy »

The problem we have is that our hosting company have updated their server.

It was working up till then, they have tried to sort out the problem but say it is with the module.

This is the new spec of server.

Is there anything there that we could ask them to look at.

Hosting Package NNC_Multisite
Server Name cp11
cPanel Version 96.0 (build 11)
Apache Version 2.4.48
PHP Version 7.3.28
MySQL Version 8.0.25
Architecture x86_64
Operating System linux
Shared IP Address 185.229.22.201
Local IP Address 10.15.20.8
Path to Sendmail /usr/sbin/sendmail
Path to Perl /usr/bin/perl
Perl Version 5.26.3
Kernel Version 4.18.0-193.28.1.lve1.el8.x86_64
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1609
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: Hit Counter

Post by DIGI3 »

You'd need to provide the error from the PHP error log. I tested the basic functionality of the module in PHP 7.4 and it worked fine, but it's possible there's other functionality that doesn't work. It's also possible it's something else and the hitcounter is a red herring - without logs there's know way to know though.
Not getting the answer you need? CMSMS support options
Barrowboy
Forum Members
Forum Members
Posts: 223
Joined: Mon Dec 16, 2013 4:09 pm

Re: Hit Counter

Post by Barrowboy »

This is the last error log.

[27-Jun-2021 16:41:17 Europe/London] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /home/buscaor/mysite.co.uk/modules/HitCounter/action.popular.php on line 97

Will this help, can the file be modified?

Thanks
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1609
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: Hit Counter

Post by DIGI3 »

That's just a warning and can be ignored for now (will likely break in a future PHP version though)

What's the actual problem you're having? Is there an error message on the frontend? One thing I noticed on my test is if you use the "popular" action it gives you a very specific error message about a missing template. There's a recent post with the solution here: viewtopic.php?f=7&t=82843&p=347384&hili ... ar#p347384
Not getting the answer you need? CMSMS support options
Barrowboy
Forum Members
Forum Members
Posts: 223
Joined: Mon Dec 16, 2013 4:09 pm

Re: Hit Counter

Post by Barrowboy »

The post you mentioned was also from me. Which we got working but no this time.

We get no error on the front end.
This is the call in the page {HitCounter action=popular limit=100}

This is the template which is set to default. the class just provides some css for it. It is just a copy of the one provided but with css.

{* popular items template *}
<div class="statslinks">
<ul class="popular">
{foreach $popular as $linkdefn}
<li>{$linkdefn->draw()}</li>
{/foreach}
</ul>
</div>
Barrowboy
Forum Members
Forum Members
Posts: 223
Joined: Mon Dec 16, 2013 4:09 pm

Re: Hit Counter

Post by Barrowboy »

Just to let you know we now have the hit counter working.

It appears it was the database hey have made some tweaks to the MySQL config on the server.

hank for all your help.
Post Reply

Return to “Modules/Add-Ons”