billv686 Posted April 12, 2014 Share Posted April 12, 2014 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 Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted April 13, 2014 Author Share Posted April 13, 2014 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. Quote 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 More sharing options...
Jack_mcs Posted April 13, 2014 Author Share Posted April 13, 2014 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. Quote 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 More sharing options...
sbetto Posted May 16, 2014 Share Posted May 16, 2014 (edited) 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 May 16, 2014 by sbetto Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted May 16, 2014 Author Share Posted May 16, 2014 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. sbetto 1 Quote 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 More sharing options...
Cheloki Posted May 26, 2014 Share Posted May 26, 2014 (edited) 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 May 26, 2014 by Cheloki Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted May 26, 2014 Author Share Posted May 26, 2014 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. Quote 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 More sharing options...
Cheloki Posted May 26, 2014 Share Posted May 26, 2014 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, Quote Link to comment Share on other sites More sharing options...
Cheloki Posted May 26, 2014 Share Posted May 26, 2014 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 Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted May 26, 2014 Author Share Posted May 26, 2014 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. Quote 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 More sharing options...
Cheloki Posted May 27, 2014 Share Posted May 27, 2014 I have reviewed all files and file "view_counter_tools.php" exists. Jack Any other ideas?. The error is 404, "The webpage can not be found" Quote Link to comment Share on other sites More sharing options...
Cheloki Posted May 27, 2014 Share Posted May 27, 2014 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 Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted May 27, 2014 Author Share Posted May 27, 2014 I'm glad you were able to figure it out and thanks for posting the solution since it may help others. Quote 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 More sharing options...
Cheloki Posted May 29, 2014 Share Posted May 29, 2014 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 Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted May 29, 2014 Author Share Posted May 29, 2014 I'm sorry but I can't understand the problem. Please try explaining it in a different way or provide screenshots. Quote 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 More sharing options...
Cheloki Posted May 30, 2014 Share Posted May 30, 2014 Quote Link to comment Share on other sites More sharing options...
Cheloki Posted May 30, 2014 Share Posted May 30, 2014 Hi Jack: sorry for my bad English, to see if it is clearer in pictures ... :rolleyes: Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted May 30, 2014 Author Share Posted May 30, 2014 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. Quote 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 More sharing options...
Cheloki Posted May 30, 2014 Share Posted May 30, 2014 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 Quote Link to comment Share on other sites More sharing options...
♥joli1811 Posted May 30, 2014 Share Posted May 30, 2014 (edited) 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 May 30, 2014 by joli1811 Quote To improve is to change; to be perfect is to change often. Link to comment Share on other sites More sharing options...
Jack_mcs Posted May 30, 2014 Author Share Posted May 30, 2014 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. Quote 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 More sharing options...
Cheloki Posted May 30, 2014 Share Posted May 30, 2014 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 Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted May 30, 2014 Author Share Posted May 30, 2014 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. Quote 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 More sharing options...
greasemonkey Posted June 3, 2014 Share Posted June 3, 2014 @@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 Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted June 3, 2014 Author Share Posted June 3, 2014 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. Quote 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 More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.