Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

View Counter


Recommended Posts

jack,

I had the 1.0 version of View Counter and just updated to the 1.3 version and I thought I would pass along a few items that caused me problems.

Per step 4 of the INSTALL.txt file I went to ip2location.com and downloaded the database as instructed, extracted and put into the admin/includes directory but when I went to use the new version, the monitor page would not display anything where previously it would display without any problems.

 

I found the following error messages in the error log.....

 

PHP Warning: require(includes/classes/IP2Location.php)

[<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /var/www/mywebsite/catalog/admin/view_counter.php on line 20, referer: http://www.mywebsite.com/admin/

 

So looking in includes/classes I found the file ip2locationlite.class.php which I assumed was named incorrectly so I changed it to IP2Location.php and the program proceeded to the next error.......

 

PHP Fatal error: Call to undefined method IP2Location:

:lookup() in /var/www/mywebsite/catalog/admin/includes/functions/view_counter.php on line 529, referer: http

://www.mywebsite/admin/configuration.php?gID=7402&cID=568

 

So looking inside the class I found that there is no method lookup() in the class file so I realized that I had the wrong class file. I went back to www.iptolocation.com website and looked a little more and proceeded to the free open source and clicked on PHP MODULE link and found the link to the IP2Location PHP Module which I downloade and unzipped where I found the correct class file in the similar named directory. I moved that IP2Location.php file to the classes directory and finally started getting data on the Monitor page....

 

This might be the problem that some other people were having as noted above......

 

So now it works but generates a lot of WARNING Messages in the log file.....

PHP Warning: fseek() expects parameter 1 to be resourc

e, boolean given in /var/mywebsite/catalog/admin/includes/classes/IP2Location.php on line 196, referer:

http://mywebsite/admin/view_counter.php

 

and

PHP Warning: unpack() [<a href='function.unpack'>funct

ion.unpack</a>]: Type V: not enough input, need 4, have 0 in /var/www/my/catalog/admin/includes/class

es/IP2Location.php on line 275, referer: http://mywebsite/admin/view_counter.php

 

Do you have any suggestions on how to stop the log filling up with warnings every time I use it........

 

Thanks for a great Addon and any help would be appreciated.

Bill V

Link to comment
Share on other sites

The ip2locationlite.class.php is not a valid file for the version you are using. You need to upload the correct IP2Location.php file from the package.

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

A new version has been uploaded with these changes:

 

- Added code to prevent duplicate entries in the ignore list.

- Added a delete button to the block country section to allow deleting blocked entries.

- Changed database install file so it works with 2.3.3.4.

- Changed the country blocking module to use curl if fopen won't work on the server.

- Fixed a problem with the refresh code in 2.3.3.4 shops.

- Fixed a problem with how the ignore list was created. Some IP's would not return as valid.

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

  • 1 month later...

I am seeing an error fairly frequently, but not all the time - View Counter - Monitor with the options Show Visitors , Active Only & Related checked:

Fatal error: Uncaught exception 'Exception' with message 'invalid data, remaining: g7NTKuX7-iKfHJCUqH_COZlkPDllSVBQUKA5fE2BcvKMNETaERAJH5QnEYnp8pj2YgQPVr1gDjgm_Vyiek-2uk13gq-XCVyeJXSKc5LRnHZwQN1C9GsOYO1InoP49o7fLrJ4stIJVAZsorEctXfSW5PWx-7EtE786u8GIMtH3byTtYWLMKCWH1CD-h2oHpP7h9zBgdDGBQWvww1hxBw-UqeyOHwLIVmJ5DVS6Equ7QyGKJ_6k0AL4P0rBSaRdlhs6W81VfjGEqJRG4CdYKvMejQWJlZulmC2WnGnoeiewmQHHjOJ4rXl9B2R7HgDlfFp1FFDZOT2yNMx8S6QZaYK14JLWf3S5erDd5YAsuKevguaoXMF9-LyF1yVVz0JVdjlCDlCdLjBft23yJXlzDYjyxVdIHrqRTgil4yAhb8UM4nAQ97dd_IYmTCAQtTzMhLeQvEhPerU4RpcX72Mp4BtI86QgTEskBAQQHMxzXZ7ds7034r114vfvYfOuSG4nNmbzbeHxKgfUlyq3EgaZPgIRdSL71gIUndDV9HS5LUDxDYDsybVLZdTPPnTClJsZmy9DuWD6mGNtRkFg2cXYqVZlGeUv2bmLMVAAywIyVTri-Jmx49Q3VDgD1hKK3Ejs5uqJYhaCXR_MdgszyXpc9nVoSYcBdF-1oaPEE6kutiNjOA9XEh7stm17X7ghbbZ1spfB_iQHHXdOC3f5YyJ0rUOo5lbn11fnBK9qHwGakzQtYLeYugBqZRR36Y54nWDDdVWEfzkwav7CGxdq_6bZVwU1IqfyuPu2m0GvRY5Rm-r0TZFguFlwxf0F9dcFz7MuelRisyFBpreC-XQ6EL_haU8jpJBdnfD1LeU1nOM4096vDFaN2pq4ljsSKHuqXRIIXMqc7w5JgFeaOxgPS_Gi07UsSNUe4gN-d5Xg1O0AN0905eNw0dFq_vWsQTDR6 in /home/bare2385/public_html/*****/includes/functions/view_counter.php on line 1737

 

I am using Osc v2.3.3.4 . Wondering if I have messed up the install somehow or have done something wrong with the view_counterDB.bin?? English (access count for last 24 hours is 442)

Edited by sbetto
Link to comment
Share on other sites

That error is being generated when ViewCounter tries to check the session and the data you show doesn't look like a valid session string so my guess is that your sessions table is corrupted. Please go into the database and run a repair on the sessions table or, if this is a test shop, just clear it, and try again. If that doesn't work, it may be something in the code that can't handle the session but I can't duplicate the problem so I can't check that.

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

  • 2 weeks later...

I have installed the version 2.3.3.4

I think I have done well what the api, it may be that I've gotten the wrong IP address? on; http://ipinfodb.com/register.php

Now on that page I am not able to return to get a key.

gives me the error that is in web;

Warning: file_get_contents(http://api.hostip.info/?ip=xx.xx.xx.xx) [function.file-get-contents]: failed to open stream: Permission denied in /home/www/domain.com/includes/modules/view_counter_country_block.php on line 79

in admin;

Warning: file_get_contents(http://api.hostip.info/?ip=xx.xx.xx.xx) [function.file-get-contents]: failed to open stream: Permission denied in /home/www/domain.com/admin/includes/functions/view_counter.php on line 1758

 

 

 

any ideas? thanks for the help

Consuelo

Edited by Cheloki
Link to comment
Share on other sites

It looks like your server is blocking that function. Try opening a browser and going directly to that page - api.hostip... If it loads, then it is your host and you will need to ask them to change the settings to allow that function to work.

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

well, problem solved. I think it was because the server had blocked the IP in question. Now what does not work, the link-Admin "view counter" - "tools"

"The webpage can not be found"

Thanks for the help,

Link to comment
Share on other sites

I'm sorry, Jack, had not seen your response help.

True, it was something from the server, I noticed that blocked the ip of "api.hostip.info address". Now I just need the link of "tools" that does not work.

I would appreciate the help.

regards

Chelo

Link to comment
Share on other sites

I can't think of any way for that to fail (no tools) other than the file is missing. Please be sure you have uploaded all of the new files to the correct location on the server.

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 already found the problem, I consulted with the server and he said this:

The problem was with the Mod_Security, after we have set it to Detect mode.

thanks for the help Jack

Consuelo

Link to comment
Share on other sites

Hi Jack, I think I have something strange happened AllProducts_SEO_v_1.3 installing. My version is 2.3.3.4. Just install "VIEW COUNTER"

It seems that everything is in place, and finished the installation was going to install the module in "admin-modules-boxes" and up the page is titled "VIEW COUNTER", and right says there are "6 modules" to install , when I select the button to see the "6 modules" to install the "all Products SEO" no module does not appear to install. Other modules in the other sections, yes they are, just disappear modules in "boxes", and I only had to install the module, I also miss what the title "COUNTER VIEW" above right?

I would appreciate the help.

regards

Link to comment
Share on other sites

If you mean the heading on the page, that is a known problem already fixed in the next release. To apply the fix, edit the admin/includes/languages/English/view_counter.php file and change

define('HEADING_TITLE', 'View Counter');

to

define('HEADING_TITLE_VC', 'View Counter');

But this change would just correct the headings on the pages. Nothing in this addon would stop modules from displaying. At least not anything I am aware of.

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

Ok, the title is corrected with this change, but still missing modules that section. I installed other addon yours too, (I'm your fan :P );

Header tagsSeo-ViewCounter-GoogleXmsSitemap-SiteMonitor-SiteSearchPlus, and finally allProductsSeo, that's when I realized that the modules did not appear in "boxes", when I tried to install the module allProdsSeo. It is possible that this mistake has to do with another installation of these addons?

regards

Cheloki

Link to comment
Share on other sites

Do not really want to mix into Jacks thread but yes you are probably on the right track.

 

I had cases in the past where a box module was installed twice so even removing left an old entry in the database table:configuration

 

(and this messed up the display in admin)

 

so best way is to check in your Table: configuration

 

Maybe uninstalling all the box modules checking the database table:configuration that all box modules are actually removed and reinstalling 1 x 1 to isolate the problem would be the best way to solve/debug

 

Regards

Joli

 

PS: may be simply a corrupted module or adding a language module to the /includes/modules/boxes by mistake or vice versa !!

Edited by joli1811
To improve is to change; to be perfect is to change often.

 

Link to comment
Share on other sites

I'm pleased to hear my addons are helpful to you. :) None of those should have caused an issue if they are working. It might be that one of the boxes added is causing the problem. I suggest deleting the files added by the addon in the includes/modules/boxes/ directory and see if that fixes the problem. If it does, then add them back in one at a time to find the one causing the failure.

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

Great¡¡

I have reviewed removing all modules includes / modules / boxes, then went up one by one as you said, and there were two blocks more, I do not know where it went, but took them off, uninstalled all modules and re-installed.

I think it's fine now.

Let's see what tomorrow holds surprise me with installing osCommerce_VTS_2_0_6. Do you think this addon?.

I wanted to have installed and database_backup_manager_v AutoBackupV, but it seems not work with oscommerce 2.3.3.4. It's a shame, because they have served me help me. do you Know something similar to back automatic data base and to fragment the copies tables?.

Thank you very much, Jack and Joli for the help, a little step to reach my goal.

regards

Cheloki

Link to comment
Share on other sites

I'm not familiar with the osCommerce_VTS_2_0_6 addon. For the backup addon, I think there is a new version that works with 2.3.3.4but you would need to ask in that support thread to find that out.

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've recently activated this addon - even though I installed it a while ago... However, yesterday, during heavy traffic (just after our monthly newsletter) the site (specifically the admin) slowed to a crawl. By heavy traffic (this is relative of course)there were at times maybe 50 to 100 active customers... most guests... maybe 5 or 10 logged in with active shopping carts. Plus a bunch of bots...

 

We've never experienced a "slowness" like this under heavy traffic, so I had assumed it must be something I had done... It took a while, for me to "think" through all the things I "tinkered" with over the weekend... and decided the view counter may be the issue - so I deactivated it in the admin and the slowness immediately disappeared.

 

It seems that under normal traffic the time to load as tested on webpagetest.com is slowed by about 3 ms (0.3 seconds). However, yesterday while under a heavier load it was slowing time to load by about 3 seconds.

 

Have you experienced something like this before? Of course this could be just a coincidence... But I thought I would bring it up. Maybe you have a though how to re-test under load to confirm I'm not off my rocker?

 

I have the config set to;

 

View Counter

 

Title Value Action

ON/OFF true

API Key XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Active Time 10

Bad Bot Trap Email

Force Reset 2

Force Reset Storage 14

Hide Admin Links

Kick Off true

Page Refresh Period 120

Rows Per Page 20

Send Emails To XXX@@xxx.com

Show Flags true

Show Account Details true

Version Checker false

 

 

 

Link to comment
Share on other sites

It sounds like View Counter is causing the problem but I've not seen such results. I've installed it into quite a few sites that have high traffic and didn't experience that. Also, even a low traffic site can have problems if all of the traffic occurs in five minutes versus 60 minutes. I can only think of two things to suggest. First, if you are using a 2.3 shop, look at the database tables in admin->Tools and convert the View Counter ones to InnoDB if they are not. Take a look at your servers raw access log (might be available in your control panel depending upon what you use) and check the time when the load occurred so see if there are any IP's with many entries all in a row, or close to it. If it is too late to check the log, try enabling View Counter again and if it causes a slow down, turn it off and look at the log then. If you find an IP heavily hitting the site, check the IP to make sure it isn't a good one and then ban it, or its range, if possible.

 

You can also look in the IP Count report to see which IP's were causing the most traffic. And then, after checking the IP to be sure it is not a good one, use the Fast Clicks report to see what they were doing.

 

 

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

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...