Guest Posted September 4, 2010 Share Posted September 4, 2010 WOL is trying to reach another site to get IP's, and that site is not responding for now.. //Function to get IP address geolocation data from IPInfoDB and update whos_online table http://ipinfodb.com/ Quick fix: in catalog/admin/whos_online.php find: //Use backup server if cannot make a connection if (!$d){ //$backup = file_get_contents("http://backup.ipinfo...ry2.php?ip=$ips"); $ch = curl_init(); $URL = ("http://ipinfodb.com/...ry2.php?ip=$ips"); Change the last line to: $URL = ("http://backup.ipinfo...ry2.php?ip=$ips"); This is working fine here.. PiLLaO 1 Quote Link to comment Share on other sites More sharing options...
VALENC1ANO Posted September 4, 2010 Share Posted September 4, 2010 Thas's not a good solution for me. My problem was this morning the who's online page appears blank, not errors not other information. The solution you were proposal don't work for me. Any idea Thanks Quote Link to comment Share on other sites More sharing options...
dreamer12 Posted September 4, 2010 Share Posted September 4, 2010 (edited) Thanks for your input it never worked for me either , any other suggestion !! i have the same error on my other website too, so it suggests it may be affecting everyone? Edited September 4, 2010 by dreamer12 Quote Link to comment Share on other sites More sharing options...
PiLLaO Posted September 4, 2010 Share Posted September 4, 2010 Quick fix: in catalog/admin/whos_online.php find: //Use backup server if cannot make a connection if (!$d){ //$backup = file_get_contents("http://backup.ipinfo...ry2.php?ip=$ips"); $ch = curl_init(); $URL = ("http://ipinfodb.com/...ry2.php?ip=$ips"); Change the last line to: $URL = ("http://backup.ipinfo...ry2.php?ip=$ips"); This is working fine here.. Perfect!! It works!! Thanks!! Quote Link to comment Share on other sites More sharing options...
romand700 Posted September 4, 2010 Share Posted September 4, 2010 Quick fix: in catalog/admin/whos_online.php find: //Use backup server if cannot make a connection if (!$d){ //$backup = file_get_contents("http://backup.ipinfo...ry2.php?ip=$ips"); $ch = curl_init(); $URL = ("http://ipinfodb.com/...ry2.php?ip=$ips"); Change the last line to: $URL = ("http://backup.ipinfo...ry2.php?ip=$ips"); This is working fine here.. Ok.. thanks.. I have this error (Fatal error: Call to undefined function get_isp_icon() in /home/xxx/public_html/xxx/whos_online.php on line 717) . you help me? Thanks.. :) Quote Link to comment Share on other sites More sharing options...
marcianokent Posted September 4, 2010 Share Posted September 4, 2010 Thank you all, it work now. Quote Link to comment Share on other sites More sharing options...
Guest Posted September 4, 2010 Share Posted September 4, 2010 Ok.. thanks.. I have this error (Fatal error: Call to undefined function get_isp_icon() in /home/xxx/public_html/xxx/whos_online.php on line 717) . At top of your file /home/xxx/public_html/xxx/whos_online.php you should have this line: require(DIR_WS_FUNCTIONS . 'whos_online.php'); That's call to the file admin/includes/functions/whos_online.php where the function (get_isp_icon) is located. Quote Link to comment Share on other sites More sharing options...
romand700 Posted September 4, 2010 Share Posted September 4, 2010 At top of your file /home/xxx/public_html/xxx/whos_online.php you should have this line: require(DIR_WS_FUNCTIONS . 'whos_online.php'); That's call to the file admin/includes/functions/whos_online.php where the function (get_isp_icon) is located. Thanks.. I have this require(DIR_WS_FUNCTIONS . 'whos_online.php') in admin/whos_online.php.. where I can find the problem '? Quote Link to comment Share on other sites More sharing options...
Guest Posted September 4, 2010 Share Posted September 4, 2010 Thanks.. I have this require(DIR_WS_FUNCTIONS . 'whos_online.php') in admin/whos_online.php.. where I can find the problem '? Look in the (online) file admin/includes/functions/whos_online.php to see that the file is the right one and that the function is there..(around line 151) Quote Link to comment Share on other sites More sharing options...
romand700 Posted September 4, 2010 Share Posted September 4, 2010 (edited) Look in the (online) file admin/includes/functions/whos_online.php to see that the file is the right one and that the function is there..(around line 151) Yes I have in line 151 this function function get_isp_icon($hostname) { etc.. :( EDIT:: Ok.. Ok.. I check the file and now work.. Thanks.. :) Edited September 4, 2010 by romand700 Quote Link to comment Share on other sites More sharing options...
Antena Posted September 4, 2010 Share Posted September 4, 2010 Quick fix: in catalog/admin/whos_online.php find: //Use backup server if cannot make a connection if (!$d){ //$backup = file_get_contents("http://backup.ipinfo...ry2.php?ip=$ips"); $ch = curl_init(); $URL = ("http://ipinfodb.com/...ry2.php?ip=$ips"); Change the last line to: $URL = ("http://backup.ipinfo...ry2.php?ip=$ips"); This is working fine here.. Thank you very much! Solved my problem. Quote Link to comment Share on other sites More sharing options...
dreamer12 Posted September 4, 2010 Share Posted September 4, 2010 looks like the site is up and running again, all errors have now resolved cheers for the reply. Quote Link to comment Share on other sites More sharing options...
TheGuy Posted September 7, 2010 Share Posted September 7, 2010 admin/whos_online.php If I turn off the capture of visitors, it shows an empty report. Which would be correct But, when I capture visitors, it just has a blan page. Any clues? Who's Online 3.6.6.2 Quote Link to comment Share on other sites More sharing options...
longhorn1999 Posted November 10, 2010 Share Posted November 10, 2010 Hi everyone, I'm using Who's Online 3.6.6 and I've noticed an intermittent problem that has popped up every few weeks or so over the past 4 months. [09-Nov-2010 18:55:24] PHP Warning: gethostbyaddr() [<a href='function.gethostbyaddr'>function.gethostbyaddr</a>]: Address is not a valid IPv4 or IPv6 address in /home/user/public_html/includes/functions/whos_online.php on line 45[09-Nov-2010 19:01:05] PHP Warning: gethostbyaddr() [<a href='function.gethostbyaddr'>function.gethostbyaddr</a>]: Address is not a valid IPv4 or IPv6 address in /home/user/public_html/includes/functions/whos_online.php on line 45 lines 35-49 of includes/functions/whos_online.php: function wo_get_host_from_addr($ip_address) { //Get hostname from IP address if (strstr($ip_address, ',')) { //if multiple responses, use first one $ips = explode(',', $ip_address); $ip_address = $ips[0]; } if ($ip_address == 'unknown') { $hostname = $ip_address; } else { $hostname = gethostbyaddr($ip_address); } return $hostname; } Is this some coding error or could it be some problem with my hosting service? I'm using a shared server for a few more weeks. Thanks Quote Link to comment Share on other sites More sharing options...
apache510 Posted November 15, 2010 Share Posted November 15, 2010 I am running whos online 3.6.6 everythings works except that it is not storing any of the Geo data into the database (country_code country_name region_name city latitude longitude). When I go into whos online in the the admin panel everthing seems to be ok but of course the Geo data fields are blank. If I use PHPMyAdmin to manually enter data into the Geo data fields, they are correctly displayed in the admin whos online panel. Can anyone tell me where the code to store the Geo data is located or why it is not being stored? Quote Link to comment Share on other sites More sharing options...
dr_lucas Posted November 16, 2010 Share Posted November 16, 2010 I am running whos online 3.6.6 everythings works except that it is not storing any of the Geo data into the database (country_code country_name region_name city latitude longitude). When I go into whos online in the the admin panel everthing seems to be ok but of course the Geo data fields are blank. If I use PHPMyAdmin to manually enter data into the Geo data fields, they are correctly displayed in the admin whos online panel. Can anyone tell me where the code to store the Geo data is located or why it is not being stored? That's because ipinfodb.com just discontinued their old API and started a new one that requires free registration and API key... http://ipinfodb.com/ Quote Did I help you? Click "Like" or "Thanks"! It's free of charge. :)My contributions:Total Configuration (newly updated 07/2018, for both osC 2.2 and 2.3.4.1 BS Frozen CE)User Tracking with Admin 1.0 (newly updated 07/2018)FedEx - Web Services v9, FAQ System , Who's Online Enhancement, Order Editor, MoneyBookers IPN, Ship in Cart (MS2), Admin Products Paging, Margin Report v1.00, 2Checkout INS / IPN (Instant Notification System) for MS2.2, Visitor Web Stats, Time Zone Offset - Adjust to match your location, Category Meta Tags Link to comment Share on other sites More sharing options...
apache510 Posted November 16, 2010 Share Posted November 16, 2010 That's because ipinfodb.com just discontinued their old API and started a new one that requires free registration and API key... http://ipinfodb.com/ THANKS!!! I registered with them and got the new API key. Now where do I put it? I did a quick search throught the files but it is not obvious where the key goes. Quote Link to comment Share on other sites More sharing options...
dr_lucas Posted November 16, 2010 Share Posted November 16, 2010 (edited) hmm, bad news it seems...ipinfodb.com wrote "To streamline our maintenance, ipinfodb.com regrets to announce the removal of the Multiple Query APIs" which means (if I read it right) that we are no longer able to use this service with any script that requires multiple queries, like "Who's online"...any alternatives or any way to make it work? Edited November 16, 2010 by dr_lucas Quote Did I help you? Click "Like" or "Thanks"! It's free of charge. :)My contributions:Total Configuration (newly updated 07/2018, for both osC 2.2 and 2.3.4.1 BS Frozen CE)User Tracking with Admin 1.0 (newly updated 07/2018)FedEx - Web Services v9, FAQ System , Who's Online Enhancement, Order Editor, MoneyBookers IPN, Ship in Cart (MS2), Admin Products Paging, Margin Report v1.00, 2Checkout INS / IPN (Instant Notification System) for MS2.2, Visitor Web Stats, Time Zone Offset - Adjust to match your location, Category Meta Tags Link to comment Share on other sites More sharing options...
apache510 Posted November 17, 2010 Share Posted November 17, 2010 Ok, the new update fixed the problem and everything is up and working again - except one thing - the pins on the map. At one time, many months ago, the pins were displayed on the map correctly. Now the map comes up and no pins. Is this a function that is permently gone? Is there a fix for this? Have I done something wrong? Does anyone still have this function working? If it is permantly gone, why still have the option of showing a map of the world? Quote Link to comment Share on other sites More sharing options...
broadstreetbully Posted November 23, 2010 Share Posted November 23, 2010 Have I said something to upset everybody? All other posts seem to get replies but mine don't seem to appear on anybody else's radar! I've asked twice about these problems but not a single comment! save yourself the time and aggravation and stop whatever your trying to do with this contribution, work backwards to get it completely out of your store and move on. This contribution cause more problems than it's worth. the SQL queries are all screwed up, the Google API field where you enter the key doesn't show up in the admin...I hag it working for a little bit then it completely failed. Tried to install again and it's screwing up the SQL saying there's a "country_name" somewhere in the field and the store goes blank..... who cares where the customers are from as long as they're on your site....just my opinion tho....:angry: Quote Link to comment Share on other sites More sharing options...
plutomon Posted December 6, 2010 Share Posted December 6, 2010 Hello, I've already installed Who's Online Enhancement 3.7 "successfully". I have also included my GoogleMaps and IPinfodb API keys. I have changed admin/images CHMOD to 777. But there are a couple of things that doesn't work: 1) It doesn't shows any information about IP addresses (neither Country nor city nor flag). 2) GoogleMap doesn't show locations. I suppose it's due to the first problem. Any help, please? Quote Link to comment Share on other sites More sharing options...
apache510 Posted December 6, 2010 Share Posted December 6, 2010 Hello, I've already installed Who's Online Enhancement 3.7 "successfully". I have also included my GoogleMaps and IPinfodb API keys. I have changed admin/images CHMOD to 777. But there are a couple of things that doesn't work: 1) It doesn't shows any information about IP addresses (neither Country nor city nor flag). 2) GoogleMap doesn't show locations. I suppose it's due to the first problem. Any help, please? Quote Link to comment Share on other sites More sharing options...
apache510 Posted December 6, 2010 Share Posted December 6, 2010 I addes the 3.7 changes as well. Everything works except the flags do not appear on the map. So the two problems may not be related. I had to tweak the a few files to add in the location of my files on the website (visitors_georss.php). Quote Link to comment Share on other sites More sharing options...
plutomon Posted December 7, 2010 Share Posted December 7, 2010 I addes the 3.7 changes as well. Everything works except the flags do not appear on the map. So the two problems may not be related. I had to tweak the a few files to add in the location of my files on the website (visitors_georss.php). What did you do to adjust it? Can you give me some information about those tweaks please? Thank you in advance Quote Link to comment Share on other sites More sharing options...
plutomon Posted December 11, 2010 Share Posted December 11, 2010 I'm still looking for the bug which makes this addon work unproperly at my osCommerce 2.2-MS2 (neither flags nor user's geographic information is showed). I've done some code changes in order to isolate the problem. At admin/whos_online.php I have included some data informations manually (IP address to be sure that there is an entry at whos_online table with that IP -that data information is showed because is included by other different function-, and Town)... function updateIps($ips){//Old,incesure method //$d = file_get_contents("http://ipinfodb.com/ip_query2.php?ip=$ips"); //Load the class $ipinfodb = new ipinfodb; $ipinfodb->setKey('My API Key from IPinfodb); //Explode the IP list $ipsArr = explode(",",$ips); if (sizeof($ipsArr) > 0){ $nb_results = sizeof($ipsArr); for ($i=0;$i<$nb_results;$i++){ $answer = $ipinfodb->getGeoLocation($ipsArr[$i]); $ip = "95.XX.XX.XX"; //$ip = mysql_real_escape_string($ipsArr[$i]); $country_code = mysql_real_escape_string($answer['CountryCode']); $country_name = mysql_real_escape_string($answer['CountryName']); $region_name = mysql_real_escape_string($answer['RegionName']); $city = "Pamplona"; //$city = mysql_real_escape_string($answer['City']); $latitude = mysql_real_escape_string($answer['Latitude']); $longitude = mysql_real_escape_string($answer['Longitude']); $ip_update_sql = "UPDATE `" . TABLE_WHOS_ONLINE . "` SET `country_code` = '$country_code',`country_name` = '$country_name', `region_name` = '$region_name', `city` = '$city', `latitude` = '$latitude', `longitude` = '$longitude' WHERE `ip_address` = '$ip'"; tep_db_query($ip_update_sql); } } } Result: my active user (as I have accessed store) now shows properly value "Pamplona" at City field. If I change to "$ip = mysql_real_escape_string($ipsArr[$i]);" it continues working...so initial string arrives and is able to read IP address. In my opinion there are 2 possible causes for the bug: 1) $answer = $ipinfodb->getGeoLocation($ipsArr[$i]); doesn't work properly and doesn't pass information to variable $answer 2) mysql_real_escape_string($answer[XXXXXXXXXX']); commands aren't working so, information is not properly passed to variables despite arriving properly to string. But my programming knowledge is extremely reduced so I can't find a solution...anybody can help me, please? Thank you in advance. 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.