Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Who's online enhancement


Recommended Posts

I just intalled the version 2.0 full package and I have the following error:


Fatal error: Call to undefined function: tep_get_ip_address() in /home/srise17/public_html/osc/admin/whos_online.php on line 377


Can anyone help me????

Link to comment
Share on other sites

Looks like you are missing the function that causes the error


Try adding this to admin/includes/functions/general.php


function tep_get_ip_address() {

if (isset($_SERVER)) {

if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {


} elseif (isset($_SERVER['HTTP_CLIENT_IP'])) {


} else {



} else {

if (getenv('HTTP_X_FORWARDED_FOR')) {

$ip = getenv('HTTP_X_FORWARDED_FOR');

} elseif (getenv('HTTP_CLIENT_IP')) {

$ip = getenv('HTTP_CLIENT_IP');

} else {

$ip = getenv('REMOTE_ADDR');




return $ip;


Link to comment
Share on other sites

Thanks for your help Khime....


I fix it copying the script which is only contained in catalog/includes/deneral.php inside the whos_online php itself on the admin folder. I also fixed a few bugs laying on the script and finished the spanish translation file.


Now I notice the script you pasted here has a return $ip;


It's need it????


(Mine seems to work without it) :P


Well.... I just paste it. (It doesn't hurt)

Link to comment
Share on other sites

  • 2 weeks later...
I have a problem since 2.0ec


Fatal error: Cannot redeclare tep_get_ip_address() (previously declared in ****/catalog/admin/whos_online.php:22) in


***/catalog/admin/includes/functions/general.php on line 1348


The default installation of OSC /catalog/admin/includes/functions/general.php does NOT include this function at all.


Somewhere down the line someone told to copy the function part from /catalog/includes/functions/general.php to /catalog/admin/includes/functions/general.php which was a big mistake instead of adding that simple code into the whos_online.php file itselt.


When any new OSC user install this contribution they will immediatelly have the script not found error since it is not called; neither contained in the admin area.


It was included in version 2.0ec as it was supposed to be since the beggining.


Sollution fo your problem is really easy... Just REMOVE the script on your /catalog/admin/includes/functions/general.php which wasn't there from the beggining but added later on manually by you.


Sorry for the trouble but is the best solution so newbies do not run crazy editing extra files.

Link to comment
Share on other sites

  • 3 months later...



Whos online rocks! thanks very much.


I wonder if you can help with an idea....


I would like a mod of whos online, to be shown at all times wherever you are in the admin...



That only shows the following






that show for up to 2 hours or more.


We could then always keep an eye on any LOST carts and act on it immediately before the customer gives up and goes elsewhere.


It should be pretty easy. I'm imagining a mini interface to the current version that is always shown throughout admin, perhaps in the header or under the left menu, with flashing icons that warn of very fresh abandoned baskets (i can provide icons :-) ).


No robots, no IP address, no referrer, just the TIMES, NAME and STATUS ICONS. (Clickable as usual of course). A future addition to this would be great to single out people that get past the Shipping page, as they must have been serious to get as far as payment.


Just an idea, but it would be fab if it was possible, dont you agree?


The Wrath.

Q/ How many therapist's does it take to change a lightbulb?

A/ Two. But the lightbulb has to really 'want' to change.

Link to comment
Share on other sites

  • 3 weeks later...

Ive been searching around the forum looking for something similar. I just want to add how many users are currently online on my homepage but once I thought I had pin pointed which code snippet to use from the whos online file I was wrong.. Not sure which code snip I need to just show that XX amount of people are online.

Link to comment
Share on other sites

  • 4 weeks later...

Hello friends,


I was very happy to find the outstanding contribution Who's online enhancement 3.21 and just installed it a few minutes ago.


Unfortunately I am getting many lines saying:


Warning: shell_exec() has been disabled for security reasons in /catalog/admin/whos_online.php on line 20


I fear that something is disabled by my provider which has to do with the IP-Address translation?


Can someone give me a hint what could be done (or deleted) to still use most of the functionality of this great contribution?


Best regards and greetings from Germany



Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...