Elazar Posted June 5, 2007 Share Posted June 5, 2007 Hi, I upgraded who's online enhancement 3.2 (THE LAST CONTRIBUTION) from who's online enhancement 2.00 by azer Then I get this error... Fatal error: Cannot redeclare tep_get_ip_address() (previously declared in /home/XXXXX/public_html/admin/whos_online.php:23) in /home/XXXXX/public_html/admin/includes/functions/general.php on line 1379 Please note that the XXXXX = my user name Did someone know how to fix it ?? Any advises please.. :'( Elazar Quote Link to comment Share on other sites More sharing options...
my3sons Posted June 11, 2007 Share Posted June 11, 2007 Hi, I upgraded who's online enhancement 3.2 (THE LAST CONTRIBUTION) from who's online enhancement 2.00 by azer Then I get this error... Fatal error: Cannot redeclare tep_get_ip_address() (previously declared in /home/XXXXX/public_html/admin/whos_online.php:23) in /home/XXXXX/public_html/admin/includes/functions/general.php on line 1379 Please note that the XXXXX = my user name Did someone know how to fix it ?? Any advises please.. :'( Elazar Find this code in /admin/includes/functions/general.php and delete it or comment it out with a /* at the beginning and a */ at the end. As the error says, it is now in the /admin/whos_online.php file and cannot be declared twice. Since I would guess future updates will keep it in the who_online.php file, it is probably best to remove or comment it out of the general.php since in the older versions it had to be added to this file. 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; } Quote Link to comment Share on other sites More sharing options...
Guest Posted June 11, 2007 Share Posted June 11, 2007 Find this code in /admin/includes/functions/general.php and delete it or comment it out with a /* at the beginning and a */ at the end. As the error says, it is now in the /admin/whos_online.php file and cannot be declared twice. Since I would guess future updates will keep it in the who_online.php file, it is probably best to remove or comment it out of the general.php since in the older versions it had to be added to this file.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 solution was also given in the support thread for the contribution. Quote Link to comment Share on other sites More sharing options...
Elazar Posted June 11, 2007 Author Share Posted June 11, 2007 Scotty & Leslie Cooper ! Thank you very much for your help friends ! I found the solution,as leslie said, at support thread for the contribution Thanks again & great day ! Elazar Quote 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.
Note: Your post will require moderator approval before it will be visible.