Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Who's OnlineEnhancement v1.7.1 error


newzealandnz

Recommended Posts

Hello all!

 

This is my 1st time posting for support so I hope this is the area to ask for a little help.

 

I have installed "Who's OnlineEnhancement v1.7.1" (http://www.oscommerce.com/community/contri...rch,Whos+Online) and when I go to run it I get the below Fatal error I have searched and searched looking for others who have the same error but I must be the only one!

 

The error...

 

Fatal error: Call to undefined function: tep_get_ip_address() in /usr/wwwroot/ddehek/newzealandnz/bestofdownunder/shop/admin/whos_online.php on line 374

 

Anyone know how to fix it?

Danny de Hek

Managing Director

 

New Zealand's Information Network

 

officecam.jpg

Link to comment
Share on other sites

Hello all!

 

This is my 1st time posting for support so I hope this is the area to ask for a little help.

 

I have installed "Who's OnlineEnhancement v1.7.1" (http://www.oscommerce.com/community/contri...rch,Whos+Online) and when I go to run it I get the below Fatal error I have searched and searched looking for others who have the same error but I must be the only one!

 

The error...

 

Fatal error: Call to undefined function: tep_get_ip_address() in /usr/wwwroot/ddehek/newzealandnz/bestofdownunder/shop/admin/whos_online.php on line 374

 

Anyone know how to fix it?

Danny,

 

This has been discussed in the Who's Online Enhancement v1.4 thread which actually covers versions 1.4 - 1.7.1. The answer is that the install instructions say that you "may" need to add the tep_get_ip_address() function to admin/includes/functions/general.php (check the instructions for the correct path). The function code is provided. Add it and you should be set.

 

ed

Link to comment
Share on other sites

Danny,

 

This has been discussed in the Who's Online Enhancement v1.4 thread which actually covers versions 1.4 - 1.7.1. The answer is that the install instructions say that you "may" need to add the tep_get_ip_address() function to admin/includes/functions/general.php (check the instructions for the correct path). The function code is provided. Add it and you should be set.

 

ed

 

Thank you for the reply ;-)

 

I now have the error...

 

Fatal error: Cannot redeclare tep_get_ip_address() (previously declared in /usr/wwwroot/ddehek/newzealandnz/includes/functions/general.php:1178) in /usr/wwwroot/ddehek/newzealandnz/includes/functions/general.php on line 1253

 

I added

 

function tep_get_ip_address() {

if (isset($_SERVER)) {

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

$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];

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

$ip = $_SERVER['HTTP_CLIENT_IP'];

} else {

$ip = $_SERVER['REMOTE_ADDR'];

}

} 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;

}

 

I noted it already had...

 

function tep_get_ip_address() {

if (isset($_SERVER)) {

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

$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];

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

$ip = $_SERVER['HTTP_CLIENT_IP'];

} else {

$ip = $_SERVER['REMOTE_ADDR'];

}

} 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;

}

 

And this is why I did not add it.

 

I will have a read of the 4.1 postings

 

Cheers

Danny de Hek

Managing Director

 

New Zealand's Information Network

 

officecam.jpg

Link to comment
Share on other sites

Thank you for the reply ;-)

 

I now have the error...

I added

 

I noted it already had...

 

And this is why I did not add it.

 

I will have a read of the 4.1 postings

Danny,

 

I'll answer here and in the other thread in case someone's looking here with the same question. You need to add the function to the admin/includes/functions/general.php, not the one in catalog/includes/functions/general.php. I stole the code originally from the catalog side.

 

ed

Link to comment
Share on other sites

Danny,

 

I'll answer here and in the other thread in case someone's looking here with the same question. You need to add the function to the admin/includes/functions/general.php, not the one in catalog/includes/functions/general.php. I stole the code originally from the catalog side.

 

ed

 

Your rock my world OB1 it works and the Who's OnlineEnhancement v1.7.1 is a neat feature!

 

Thank you I could not see it for looking!!

Danny de Hek

Managing Director

 

New Zealand's Information Network

 

officecam.jpg

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