Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

View Counter


Recommended Posts

@@elara You shouldn't use the block countries option in the released version. It relies on an external site which is not accessible as much as it is. When it can't be reached, it causes View Counter to wait for it, so your site doesn't respond. If you are using V 1.5 there is an option to disable it. if you are using a version prior to 1.5, you have to edit the code to stop it.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hello Jack,

 

please I need urgent help.

 

some minutes ago I was testing changing some options, I activate country ban in the configuration and then i was to monitor, after that I banned one visitor IP for testing (not my IP) on view_counter, my website became inaccessible and it now shows the bellow error message.

 

Please help me to know what files are modified after I banned one IP in the view_counter monitor. Thanks for your urgent help.

 

 

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Hello Jack,

 

just for comment that I solved my web inaccessibility.

I realized view_counter modified the .htaccess file placed in the /root/mysite folder, but not in the root folder as instruction said.. ¿?.

I replaced the  .htaccess file placed in the /root/mysite folder from my backup and site back to be accesable.

I am going to compare these files for some clue.

Thanks for your comments.

Link to comment
Share on other sites

Hi again,

 

I am only a beginner, therefore I believe that I could have discovered the problem.

 

I realized that view_counter added some lines at the end of to my  /root/mysite/.htaccess file and my site was inaccesible.

 

 
</IfModule> # Begin IP deny by View Counter from www.oscommerce-solution.com
order allow,deny
deny from 158.69.209.141
allow from all
# End IP deny by View Counter from www.oscommerce-solution.com
 
I put an Enter at the begining of these lines added and everything seems to be working again.
 
</IfModule>
# Begin IP deny by View Counter from www.oscommerce-solution.com
order allow,deny
deny from 158.69.209.141
allow from all
# End IP deny by View Counter from www.oscommerce-solution.com
 
 

That I made is correct??

 

Thanks a lot.

Link to comment
Share on other sites

@@elara The first error you posted is from V 1.5 but the second is from V 1.4 so you may not have upgraded or installed properly. But the only times I've seen those errors has been because of a corrupted sessions table. So if you really are using 1.5 and repairing the sessions table doesn't help, I'm sorry but I don't know what else it might be. You could try changing the Recreate Session setting in admin->Configuration->Sessions, click around the shop some to cause the monitor section to add new entries to see if that helps. Also, you can change the number of rows it shows to try to determine if it is a particular IP that is causing it. So if it is failing and the rows are set to 20, change them to 10. If it works, then increase the count to try to isolate the one that is failing. That won't help by itself but If you can identify something common, it might.

 

For the related box, that doesn't work. I had added with the thought of displaying related entries in tree format and it worked, sort of. But it confused other parts of the code and I've never gone back to finish it. So if you uncheck it, it will just check itself again.

Hi Jack,

 

I dont understand by you talk about v1.4,  only installed the View Countes v1.5 (I dont have any other View Counter version installed before). I donwloaded that  complete package from this link: 

http://addons.oscommerce.com/info/8781

 

(I did my best and as far as I know I followed the instalation instrucctions carefully. I upload all of the files in the NewFiles directory to the correct

location on the server, modified existing files according instructions, and so on).
 

Is there a 1.6 version?, Could this version solve the fatal error I have?, where I can get that new version?

 

Thanks.

 
Link to comment
Share on other sites

I mentioned 1.4 because you posted two errors at different times and the line numbers in them were different. One line matched the 1.4 file and one matched the 1.5 file. That could be because of some change you made to the code but I can only guess without being told.

 

In a post 278 you said you had it working. I take it that is not the case? Did you upload a database file and name it correctly?

 

V 1.6 hasn't been released. I don't know if it will solve the error you are having since I don't know what is causing it. Many are using versions prior to 1.6 without any problems so it would seem to be something in your installation or to do with your server. I'll PM you about it.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hi, need advise here

 

When the monitor shows a connection as "spoofed as: adsbot-google", what does this actually mean? and should I block the IP?

 

Thanks

Mike

osC CE live - developing osC Phoenix adding modules with no core changes(awesome and easy!)

Link to comment
Share on other sites

It is meant to show a connection that is not really a search engine. It is sometime difficult to be sure so check first. Click on the IP detail button (the ? at the right) and see if it really is google. If it is, then it is fine. If not, then you need to decide whether to ban it or not. It is possible to set a browser to appear as a search engine and some developers use this and forget to turn it off. So this may just be an innocent spoof. But others use it to try to trick the site for one reason or another. Those will usually show more than one or two hits. So, in general, I would say if it is not a search engine and there is a more than normal number of visits, especially if the time between the clicks is very low, then the IP should be banned.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 3 weeks later...

Did a tables check:

 

view_counter 73 0.09M InnoDB utf8_unicode_ci view_counter_banned 452 0.05M InnoDB utf8_unicode_ci view_counter_block_list 186 0.03M InnoDB utf8_unicode_ci view_counter_blocked 26 0.03M InnoDB utf8_unicode_ci view_counter_emails 0 0.03M InnoDB utf8_unicode_ci view_counter_flags 13912 11.83M InnoDB utf8_unicode_ci view_counter_ignore 0 0.02M InnoDB utf8_unicode_ci view_counter_session_kill 0 0.02M InnoDB utf8_unicode_ci view_counter_settings 6 0.02M InnoDB utf8_unicode_ci view_counter_storage 380 0.19M InnoDB utf8_unicode_ci   whos_online 1 0M MyISAM utf8_unicode_ci

 

InnoDB is that correct?

Link to comment
Share on other sites

I can't think of any reason for it to stop working by itself. Are you sure you haven't turned it off in the settings? Have there been any changes made to the sites files?

 

The database engine doesn't matter as far as the code working or not.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Jack_mcs, thank you for your reply.

 

Performed a table check and optimize. Did a load-up of a new database - I don't know why, it's working again. To answer your questions, no, I didn't change anything. Maybe 11.83M is too big or take too long time to be transfered? But meanwhile view_counter_flags growed up to 24.03M. In the config show flags is set on false, block countries also. I have no idea...

Link to comment
Share on other sites

I took a look at the .htaccess:

 

# Begin IP deny by View Counter from www.oscommerce-solution.com
order allow,deny
deny from 100.43.85.14
...

...
deny from 180.76.15.155
allow from all
# End IP deny by View Counter from www.oscommerce-solution.com

# Begin IP deny by View Counter from www.oscommerce-solution.com
order allow,deny
allow from all
# End IP deny by View Counter from www.oscommerce-solution.com

 

Is it correct to the sections double?

Link to comment
Share on other sites

24 MB seems rather large for the flags table. The code uses cookies to determine if the flags table should be updated so it might be that cookies are not working in your browser, you are using different browsers or the cookies keep getting cleared. But even at that, the size doesn't matter with regards to the operation of the code. It just swells the size of the database.

 

There should only be one set of comments in the .htaccess file. It doesn't hurt to have more than one set other than it needlessly increases the size of that file. I've seen extra pairs like that in a few sites I've worked on but when I tried testing those sites by blocking an IP another set didn't get added. So I don't know why it does it and can't duplicate it.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

I am using oscommerce 2.3.4

I was trying to install this addon but facing an issue....

 

This step

In admin/includes/column_left.php, look for require(DIR_WS_BOXES...

   or include(DIR_WS_BOXES..., and add this line before it:

 

  require(DIR_WS_BOXES . 'view_counter.php');

 

include(DIR_WS_BOXES .... or require(DIR_WS_BOXES.. is not found on admin/includes/column_left.php as the installation of box modules differ;

Can you please elaborate on how to perform this step in oscommerce 2.3.4

 

Help will be deeply appreciated

Thanks in advance...

Edited by radhavallabh
Link to comment
Share on other sites

 

There should only be one set of comments in the .htaccess file. It doesn't hurt to have more than one set other than it needlessly increases the size of that file. I've seen extra pairs like that in a few sites I've worked on but when I tried testing those sites by blocking an IP another set didn't get added. So I don't know why it does it and can't duplicate it.

I'll remove the last one.

Link to comment
Share on other sites

@@radhavallabh Newer versions of oscommerce don't require an entry in the left column file. That's why the instructions state:

 

If you can't find either, skip this step.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

@@stefan21 Removing the comments is fine but if there are deny statements between them, they shouldn't be deleted, unless you want to unblock those IP's. If you do move the deny statements, you don't need to copy the order allow,deny and allow from all statements. They can be deleted.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

If the version you have has an option to turn off the country blocking code, then that will do it. Otherwise you have to edit the code to skip that code. Also see the comments on this and the last page regarding blocking countries.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

@@Jack_mcs,

I have the code with the option to switch off country checking, but this does not switch off look up on the monitor page in admin, or appears not to.

 

this is the response on the monitor page

 

 

Warning: file_get_contents(): php_network_getaddresses: gethostbyname failed. errno=0 in /volume1/web/shopbs/WadminH/includes/functions/view_counter.php on line 1764 Warning: file_get_contents(http://api.hostip.info/?ip=68.180.228.233): failed to open stream: php_network_getaddresses: gethostbyname failed. errno=0 in /volume1/web/shopbs/WadminH/includes/functions/view_counter.php on line 1764

 

country checking is set to false

 

Mike

osC CE live - developing osC Phoenix adding modules with no core changes(awesome and easy!)

Link to comment
Share on other sites

show flag is set to false....

 

So, do you have any other option, or is my version out of date

 

the check version option say i'm running the latest version 1.5

Edited by Mikepo

osC CE live - developing osC Phoenix adding modules with no core changes(awesome and easy!)

Link to comment
Share on other sites

1.5 is the latest released version. Please try this: In the admin/includes/functions/view_counter.php file, find this at line 318

if (true) {

and change it to

if (VIEW_COUNTER_SHOW_FLAGS == 'true') {

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

@@Jack_mcs,

Thanks, that worked, and we are back to normal.

 

BTW, this addon works well, and identifies attacks which I wouldn't now about.  Thanks, a fully recommended addon :)

 

Mike

osC CE live - developing osC Phoenix adding modules with no core changes(awesome and easy!)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...