newzealandnz Posted October 29, 2005 Share Posted October 29, 2005 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? Quote Danny de Hek Managing Director New Zealand's Information Network Link to comment Share on other sites More sharing options...
Guest Posted October 31, 2005 Share Posted October 31, 2005 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 Quote Link to comment Share on other sites More sharing options...
newzealandnz Posted October 31, 2005 Author Share Posted October 31, 2005 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 Quote Danny de Hek Managing Director New Zealand's Information Network Link to comment Share on other sites More sharing options...
Guest Posted November 1, 2005 Share Posted November 1, 2005 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 Quote Link to comment Share on other sites More sharing options...
newzealandnz Posted November 1, 2005 Author Share Posted November 1, 2005 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!! Quote Danny de Hek Managing Director New Zealand's Information Network 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.