Jump to content
medvid

Who's Online Enhancement 1.4

Recommended Posts

Who's Online Enhancement 2-1.00 full package

 

:( why?

 

Fatal error: Call to undefined function: tep_get_ip_address() in /var/www/ladysilvia/shop/admin/whos_online.php on line 376

 

admin_error.png

 

 

367 // Display Status

368 // Check who it is and set values

369 $is_bot = $is_admin = $is_guest = $is_account = false;

370 // Bot detection

371 if ($whos_online['customer_id'] < 0) {

372 $total_bots++;

373 $fg_color = $fg_color_bot;

374 $is_bot = true;

375 // Admin detection

376 --> } elseif ($whos_online['ip_address'] == tep_get_ip_address() ) { //$_SERVER["REMOTE_ADDR"]) {

377 $total_admin++;

378 $fg_color = $fg_color_admin;

379 $is_admin = true;

380 // Guest detection (may include Bots not detected by Prevent Spider Sessions/spiders.txt)

381 } elseif ($whos_online['customer_id'] == 0) {

382 $fg_color = $fg_color_guest;

383 $is_guest = true;

384 $total_guests++;

385 // Everyone else (should only be account holders)

386 } else {

387 $fg_color = $fg_color_account;

388 $is_account = true;

389 $total_loggedon++;

390 }

Thank you

Bye!

 

   // Display Status
  //   Check who it is and set values
$is_bot = $is_admin = $is_guest = $is_account = false;
// Bot detection
if ($whos_online['customer_id'] < 0) {
  $total_bots++;
  $fg_color = $fg_color_bot;
  $is_bot = true;
  // Admin detection
} elseif ($whos_online['ip_address'] == tep_get_ip_address() ) { //$_SERVER["REMOTE_ADDR"]) {
  $total_admin++;
  $fg_color = $fg_color_admin;
  $is_admin = true;
// Guest detection (may include Bots not detected by Prevent Spider Sessions/spiders.txt)
} elseif ($whos_online['customer_id'] == 0) {
  $fg_color = $fg_color_guest;
  $is_guest = true;
  $total_guests++;
// Everyone else (should only be account holders)
} else {
  $fg_color = $fg_color_account;
  $is_account = true;
  $total_loggedon++;
}

Share this post


Link to post
Share on other sites
i just installed the latest version and everything works but the shopping cvart contents are blank.. and all my settings are correct.

Did I miss something in this topic or is there still no solution for this problem?

Share this post


Link to post
Share on other sites
aHfUi,

 

It looks like you missed the step in the instructions to add some fields to the whos_online table in the database. Check the instructions for the SQL code.

 

ed

 

The strange thing is that the 2 sql statments have been run by me during install but the 2 fields mentioned:

 

2A) Run this line on your MySQL database if you've never installed a previous version of this contribution! (through phpMyAdmin, SSH, etc.):
  ALTER TABLE whos_online ADD http_referer VARCHAR(255) NOT NULL;

2B) This is brand new for v1.6.1 Beta. Run this line on your MySQL database. (through phpMyAdmin, SSH, etc.):
  ALTER TABLE whos_online ADD user_agent VARCHAR(255) NOT NULL;

 

Just disapered from my database.....

 

Thanks to this topic an you guys I was able to get this contribution (and my shop) back to normal after scarring to death by this error on my frontpage:

 

ERROR:Please click here to restart site

 

1054 - Unknown column 'http_referer' in 'field list'

 

insert into whos_online (customer_id, full_name, session_id, ip_address, time_entry, time_last_click, last_page_url, http_referer, user_agent) values ('0', 'Guest', '1b92a4eeca1d326b842d11b5aad71289', '***.***.***.***', '1158305351', '1158305351', '/login.php?osCsid=1b92a4eeca1d326b842d11b5aad71289', 'http://www.**********.nl/', 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)')

 

[TEP STOP]

 

 

Thanks!


Norman in 't Veldt

 

Moderator

osCommerce The Netherlands

Share this post


Link to post
Share on other sites

OK,

 

narrowed it down to an old bug that was fixed a long time ago in my shop.

Turned out that the two tables needed for the Who's Online Enhancemend where missing from the backup_whos_online tables.

 

Just to let you know.


Norman in 't Veldt

 

Moderator

osCommerce The Netherlands

Share this post


Link to post
Share on other sites

Hi guys,

 

Is there a solution to the following problem:

Fatal error: Maximum execution time of 220 seconds exceeded in /var/www/shop/admin/whos_online.php on line 92

Any help would be greatly appreciated.

 

Thanks in advance,

Irina.

Edited by Irin

Share this post


Link to post
Share on other sites

I've had this working for about 2 months or so, but then for the last month I haven't been able to see what's in anyones carts. The list is empty, and no one has the icon next to them saying they have anything in their cart even when I'm 100% sure they do (I added stuff to my cart as a test).

 

My whos_online.php file is completely unedited and is the latest version. Anyone know what I should look at to fix this? Or even better, anyone actually know how to fix that?

 

Update: I found the solution seconds after posting this. I set store sessions to mysql in the config file. I guess I changed it to mysql for the main config file but not the admin config file which caused it not to pick up on that info.

Edited by yatahaze

Share this post


Link to post
Share on other sites

I'm still having a problem getting this to show the category the person is in. Does anyone else run their store in a subdirectory? I run 2 stores on the same server. One is like 'shop.site.com' the other is like 'www.site.com/shop'. The one that has the /shop doesn't show what category the person is in, the other does. Am I right?

Share this post


Link to post
Share on other sites

I've got an idea of where the problem lies I think.

 

$category_query=tep_db_query("select categories_name from categories_description where categories_id='" . $parameters[$i] . "' and language_id = '" . $languages_id . "'");

 

The section of that code:

$parameters[$i]

retreives nothing. The query is saying "select the category name from the table where the id is nothing. I know this because if I replace that with one of my category's id numbers, that categories name appears. Somewhere along the line its not getting the id properly.

 

I'm trying to figure this out myself, but I dont know anything about php, so I'm just copying and pasting code around, etc.

Edited by yatahaze

Share this post


Link to post
Share on other sites

I finally figured it out, there was a double == somewhere and a commented out $i=0; that I uncommented, now it works.

Share this post


Link to post
Share on other sites
hi guys

 

Contrib works great .. the only problem for me now is public part, infobox, that shows who's online

 

online.jpg

 

members (člani) are truly members and a lot of bots, which are blank in infobox, spaces between commas .. when truly member is, there is a name ....

 

any idea how to "cut OFF" these commas bots, to show truly members .. or at least break them up, and show bots separately?

 

thanx

 

i'm looking all over, but i don't know where to post this problem .. since this thread is for admin only .. :blush:

Share this post


Link to post
Share on other sites

I have a serious problem with the "Who's Online" module. It causes high loads on my server. Somehow, it utilizes 58% of the CPU usage. I have no idea why is this hapenning. I'm getting the following Fatal error:

Fatal error: Maximum execution time of 220 seconds exceeded in /var/www/shop/admin/whos_online.php on line 92

Please help.

Share this post


Link to post
Share on other sites

I wonder if anyone can help with a couple of problems, firstly I can see that I need to apply the count fix! Secondly, the profile display was working when I first installed the contribution but has since stopped (need a scratch-head or shrug smiley, lol) and yes it would be nice to be able to keep the refresh rate while viewing profiles... Thirdly, anyone know why showmyip and the who's online contributionare seeing my IP address as one thing when it shows up as something different when I browse the shop??

Share this post


Link to post
Share on other sites

Please help!!!!!!!!!!!!!!!

 

PHP Fatal error: Maximum

execution time of 60 seconds exceeded in

web/admin/whos_online.php on line 81

 

 

PHP Fatal error: Maximum

execution time of 60 seconds exceeded in

/web/admin/whos_online.php on line 88, referer:

Share this post


Link to post
Share on other sites
Please help!!!!!!!!!!!!!!!

 

PHP Fatal error: Maximum

execution time of 60 seconds exceeded in

web/admin/whos_online.php on line 81

PHP Fatal error: Maximum

execution time of 60 seconds exceeded in

/web/admin/whos_online.php on line 88, referer:

I do not know enough of this contrib to oversee the impact but while installing this for a client I encountered the same problem. The platform is PHP5 with MySql5 and for the moment I solved it by commenting out:

//	  for ($i=$start_cart; $i<$length; $i++) {
//	  if ($session_data[$i] == '{') {
//		  if (isset($tag)) {
//			$tag++;
//		  } else {
//			$tag = 1;
//		  }
//		} elseif ($session_data[$i] == '}') {
//		  $tag--;
//		} elseif ( (isset($tag)) && ($tag < 1) ) {
//		  break;
//		}
//	  }

as this seems go give an endless loop almost anytime. This part occurs two times within the admin/whos_online.php and you have to comment it out for both !

I have no idea what this part is responsible for but all seems fine...

Share this post


Link to post
Share on other sites
I do not know enough of this contrib to oversee the impact but while installing this for a client I encountered the same problem. The platform is PHP5 with MySql5 and for the moment I solved it by commenting out:

//	  for ($i=$start_cart; $i<$length; $i++) {
//	  if ($session_data[$i] == '{') {
//		  if (isset($tag)) {
//			$tag++;
//		  } else {
//			$tag = 1;
//		  }
//		} elseif ($session_data[$i] == '}') {
//		  $tag--;
//		} elseif ( (isset($tag)) && ($tag < 1) ) {
//		  break;
//		}
//	  }

as this seems go give an endless loop almost anytime. This part occurs two times within the admin/whos_online.php and you have to comment it out for both !

I have no idea what this part is responsible for but all seems fine...

wheeloftime, your solution does work, indeed. No more errors and everything seems to be working fine. The question is what is that block of code for and, if commented out, how it affects the module's functioning. Anyway, thanks a lot for sharing your solution with us.

 

Merry Christmas and Happy New Year to everyone!

Share this post


Link to post
Share on other sites

I've just upgraded to version2 of Who's online and can't seem to get the product to display properly and the refering always says not found.

 

in the last url I either get the php file name, which is a good thing, or (product) with no description. I've tried the update to add a line of code but that doesn't work either.

 

I think the config is set correctly and the config file is set to mysql. Just wanted to check the absoulte path for /tmp, what should this absoulte path look like? or does anyone have any ideas of what else could be wrong?

 

Regards

Chris

Share this post


Link to post
Share on other sites

I just added this contribution and i get this error=

¡Error in the server!

El servidor encontro un error interno y fue imposible completar su solicitud.

 

Mensaje de error:

Premature end of script headers: whos_online.php

 

Por favor contacte con el webmaster en caso de que usted crea que existe un error en el servidor.

 

Error 500

Share this post


Link to post
Share on other sites
wheeloftime, your solution does work, indeed. No more errors and everything seems to be working fine. The question is what is that block of code for and, if commented out, how it affects the module's functioning. Anyway, thanks a lot for sharing your solution with us.

 

Merry Christmas and Happy New Year to everyone!

The only problem that popped up with this fix is that the Users Shopping Cart is no longer displayed, the status is always shown as Active/NoCart even though there is a cart. So, I guess that commenting out that block of code does affect the module's functionality. Is there any fix for that or any better solution to the PHP Fatal error?

 

Thanks.

Share this post


Link to post
Share on other sites
The only problem that popped up with this fix is that the Users Shopping Cart is no longer displayed, the status is always shown as Active/NoCart even though there is a cart. So, I guess that commenting out that block of code does affect the module's functionality. Is there any fix for that or any better solution to the PHP Fatal error?

 

Thanks.

Yep. Noticed that also and so it is only a temporarily solution at the best...

I tried to simulate it on a local installation with PHP5 and MySQL5 but there the original script just works fine. Today the clients domain will be put back to normal and I can start investigating this further. It looks like something server related but I have not found any clues yet...

 

regards,

Howard

Share this post


Link to post
Share on other sites

hi guys

 

got updated to latest version and now page stops loading at half of list .. sometimes it displays whole list .. sometimes only few lines .. then stops loading ..

 

any idea?

Share this post


Link to post
Share on other sites
hi guys

 

got updated to latest version and now page stops loading at half of list .. sometimes it displays whole list .. sometimes only few lines .. then stops loading ..

 

any idea?

Read above for a temporarily fix ?

 

Anyhow, I am curious about the following for everyone having this problem (which I can not reproduce on my local PHP5/MySQL5 setup). Does the serverinfo give indication of:

This server is protected with the Suhosin Patch 0.9.5

Copyright © 2006 Hardened-PHP Project

 

??

 

It seems this scrambles the session data and so the routine to check the cart inside the admin/whos_online.php could fail because of this. I haven't had time yet to investigate this further but it seems the most logic explanation I could find so far.

 

regards,

Howard

Share this post


Link to post
Share on other sites

I notice every few weeks that someone is one my site opening a new page and new session every second. The last one was 52 sessions using the same ip address.

 

How I solve it is to ban that ip address with a mod I wrote.

 

Is anyone interested in a simple mod to the Who's Online Enhancement that allows the admin to ban ip addresses?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×