Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

View Counter


Recommended Posts

Coming up with a few errors:

 

Date / Time: 03-08-2015 23:04:27
Error Type: [E_NOTICE] Undefined variable: invalidAttempt
On line 245
File includes/modules/view_counter.php
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Date / Time: 03-08-2015 23:04:27
Error Type: [E_NOTICE] Undefined variable: invalidAttempt
On line 262
File includes/modules/view_counter.php
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

 

Date / Time: 03-08-2015 23:04:51
Error Type: [E_NOTICE] Undefined offset: 1
On line 328
File includes/modules/view_counter.php
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

 

Any ideas?

 

regards,

stefan

Link to comment
Share on other sites

At lines 245 and 262, change this

if ($invalidAttempt) {

to this

if (isset($invalidAttempt) && $invalidAttempt) {

At line 328, change

$referrer_query = $refer_data[1];

to this

$referrer_query = (isset($refer_data[1]) ? $refer_data[1] : '');

Support Links:

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

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Jack_mcs,

 

thank you for your help. These errors are gone.

 

While trying out, got now another one:

 

Date / Time: 04-08-2015 09:11:36
Error Type: [E_NOTICE] Undefined index: HTTP_REFERER
On line 325
File includes/modules/view_counter.php
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

 

Best regards,

stefan

Link to comment
Share on other sites

Try changing

    	$refer_data = addslashes(tep_db_input(urldecode($_SERVER['HTTP_REFERER'])));
    	$refer_data = explode('?', $refer_data);

to

     if (isset($_SERVER['HTTP_REFERER'])) {
         $refer_data = addslashes(tep_db_input(urldecode($_SERVER['HTTP_REFERER'])));
         $refer_data = explode('?', $refer_data);
     } else {
         $refer_data = array(0 => '', 1 => '');
     } 

Support Links:

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

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Jack_mcs,

 

some other errors are showing up:

 

Date / Time: 05-08-2015 10:11:02
Error Type: [E_NOTICE] Undefined index: HTTP_CLIENT_IP
On line 5
File includes/modules/view_counter_country_block.php
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Date / Time: 05-08-2015 10:11:02
Error Type: [E_NOTICE] Undefined index: HTTP_X_FORWARDED_FOR
On line 6
File includes/modules/view_counter_country_block.php
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Date / Time: 05-08-2015 10:11:02
Error Type: [E_NOTICE] Undefined variable: spider_flag
On line 99
File includes/modules/view_counter.php
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

 

Date / Time: 05-08-2015 10:46:00
Error Type: [E_NOTICE] Undefined variable: ua
On line 176
File includes/modules/view_counter.php
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Edited by stefan21
Link to comment
Share on other sites

To be clear, those, and the others you mentioned, are notices, not errors. As such, they are harmless. All of the last ones you mention are because the variables are not defined before using them. They can be defined using the isset statement but it isn't something I have time for right now, especially since I suspect there will be others.

Support Links:

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

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...

Hello to all. I am thinking of installing this module. However since i am not experienced, and this module requires many changes, i am a bit afraid.

My question is, does this module generally works or at least doesn't destroys something else? 

Thanks!

 

Edit: I received a reply in another thread and i am going to install it right now.

Edited by NUKE1989
Link to comment
Share on other sites

I replied in your other thread for this but will post it again here in case others just see this post:

 

The only problem is if the block countries option is enabled. It uses an external site and that site seems to be down more than up. This has been fixed in the unreleased version.

 

I should add to this that the addon has an on/off setting so that if there is some problem, it can be turned off and that will be as if it was never installed.

Support Links:

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

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Okay, i almost did everything that i had to do. Before i turn it on i would like to ask some questions about Install.txt:

 

2) view_counter_install.php wasnt on New Files folder but on database folder. So i just put it on catalog folder and seems that it worked. I believe this needs a bit more clarification.

 

4) admin/languages/english.php should be admin/includes/languages/english.php     right?

 

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

   or include(DIR_WS_BOXES...,
 
I cant find this line... 
EDIT: I  just saw your post The left column change only applies to shops that have the old style of left_column.php (before 2.3.3, I think).
 
 

8) If oscommerce version 2.3 or above, if the ckeditor is installed, ....                 i have no idea if ckeditor is installed so i changed nothing for now. I assume i would know if i had it installed.

 

 

11) In the root's .htaccess file,....       Thats what i am mostly afraid. What do you mean by root's?  There is one .htaccess file on /catalog and another on /catalog/admin. You mean the first one? And if my name is "abcde" instead of "admin" does that mean that line   RewriteCond %{REQUEST_URI} "/admin/"  should be RewriteCond %{REQUEST_URI} "/abcde/"  ?

 

12)  I dont seem to have a robot.txt file anywhere...

 

Thanks a lot.

Edited by NUKE1989
Link to comment
Share on other sites

Thank you for mentioning the mistakes in the install file. It is difficult for a developer to see such things since they know what they mean and don't see the obvious problems.

 

I've corrected the install instructions for #2 and #4. What you did was correct.

 

#6 already mentions that in the install file.

 

#8 The ckeditor is an html editor used, mainly, for product descriptions. It has to be installed so you would probably know if it was there.

 

#11 The root directory, in this case, is the directory your shop is located in, which is the catalog directory. The instructions state, "only if
your admin is not named admin" so since your admin is not named admin, you would add it. Hackers know that the default admin name is admin so they will try to access it. That command will trap them. But if your admin is named admin, it will trap you too.

 

#12 A robots file is not included in the basic shop but it should be added, not just for this addon. Search the web for robots file. There are also examples here on the forums but some are incorrect so only add one if you are sure it is correct.

Support Links:

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

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 2 weeks later...

Hi Jack,

In post #263 there is mention of "

The only problem is if the block countries option is enabled. It uses an external site and that site seems to be down more than up. This has been fixed in the unreleased version."

 

You had installed (On Target Sports) V1.6 the first week of November, would this have this Fix mentioned?

 

On another subject, how many IP's can be blocked before it begings to degrade site performance, if at all?

 

Thanks

Ken

Edited by Ken_Shea
Link to comment
Share on other sites

@@Ken_Shea Yes, version 1.6 has the country blocking code fixed so it is safe to use that option. Just be sure to have the country blocking option for the shop side set to Internal.

 

As for the size, there are two different blocks going on. If you are referring to the country blocking, those IP's are stored in the database so the size shouldn't make much of a difference on performance. If you are referring to blocking IP's in the monitor section, those are added to the root's .htaccess file. There's no limit on how large that file can be but the larger it gets the slower the site will become because that file keeps getting loaded. I think a size of around 30KB is fine and won't cause any noticeable slowness, though there are a number of other factors to consider, like server speed and the other commands in the file. You can test it by enabling the display queries option, running a test and then reducing the file to the smallest size and testing again. Maybe duplicate the entries in the file until it reaches 50KB or so and see what that does.

Support Links:

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

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hi Jack,

 

thanks for your contribution and support.

 

Just I installed View Countes v1.5 on my Oscommerce 2.3.1 and it shows the following error message, ¿Some advice?

 

Fatal error: Uncaught exception 'Exception' with message 'invalid data, remaining: uHxFYccbLgzQc7lO7udCoQFazwisMObokg2sBl1g6j6YYVwboHCx_KU9p5KxL21WedeUD8ZOh6y-lsuPROfNTM_ud4_nJDO8IkL8rfzOU9ngNp_oxFsrLqpjWV1WQB-XoFTGN5-T3qfAVN6EzFvmQvADxUPCZKjgwqVfjjadyWi2qZJgf74USgah0ydjA4RRo2pVPQ1Vkrb8oweLWuFlNJQmH_ZSvtFXgxfSf_OX-wVcfB_qQxfYGQOB16TQbR46-6Ac1hdx8CfUulQFd9OxegR37RDAtARjwVt0GW3QoYKV5-lpaamkf0tk2AvSDQuy0EhkoW1qmw-XQAJfIToeJpxtkJ5tx5Mrq1Poc4LZlV5MxLpO1I9qVUE3dT9dYg_PfFFo50Mw35GkJTTZfVWDrpcHlorNuJAG4on2ECKcl84M5--0es_VY4l6ei3coxHs_8Uu0uZbxl5QQDjMqraFVHVMHWxSG_TsTimxlnhCW2b5p7OgwmKiqQlQ_zXpWmBzkv-k_Wx9u-NbyL4bjpyXJDdl3HxTMCvj1QMHyj0kmA7XZNoXPKNXtfD0o008izJLBsfnjHvHBjjO80AsiSZCwf1nFBTpAHK2iQOtFayiNSo.' in /home/ipexpres/public_html/pyme/admin/includes/functions/view_counter.php:1743 Stack trace: #0 /home/ipexpres/public_html/pyme/admin/includes/functions/view_counter.php(1318): UnserializeSession('uHxFYccbLgzQc7l...') #1 /home/ipexpres/public_html/pyme/admin/view_counter.php(671): ShowCart('72d50ba32fd804e...', 300, '') #2 {main in/home/ipexpres/public_html/pyme/admin/includes/functions/view_counter.php on line 1743

 

 

Thanks in advanced.

Link to comment
Share on other sites

I just realized that the fatal error only appers when I select visitors.

On the other hand I realized that I was unable to uncheck the Related box option, everytime that I try to uncheck this box, it back to be checked.

Only when visitors is selected the fatal error appers again.

 

Thanks.

Link to comment
Share on other sites

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)

Hi, could you solve this problem?, Could you please tell me?

Link to comment
Share on other sites

Hi Jack,

 

I went into the database and run a repair on the sessions table as you mentioned above, nevertheless fatal error continues. Please your help, I have done everything and I cant find the solution.

 

Thanks a lot again. 

Link to comment
Share on other sites

Jack,

V1.6 does not appear to be blocking countries in the list.

I deleted the current list of countries to be blocked to start afresh but it does not appear to be creating this blocked list.

Perhaps it won't show up in the list untill the first visitor occurance from those on the list?

 

There have been numerous visits from countries on the original blocked list.

 

No reply expected during the Thanksgiving season.

 

 

Ken

 

 

 

 

 

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.

Support Links:

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

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

@@Ken_Shea Thank you for your consideration. The country blocking code is working fine in most of the shops that have 1.6 installed but I have had another one mention having the problem.  I'll let you know if I can find a fix, which I hope will be this weekend.

Support Links:

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

All of My Addons

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.

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