boionfire81 Posted April 28, 2016 Share Posted April 28, 2016 inactives are giving a gethostbyaddr(): Address is not a valid IPv4 or IPv6 address (2) on viewing profile Quote Link to comment Share on other sites More sharing options...
TheMasterGeneral Posted April 28, 2016 Share Posted April 28, 2016 MCCv2, correct? I believe if you add users by the staff panel, it doesn't give an default IP to one of the fields. Check the panel, and your database and input a default IP (127.0.0.1 or whatever) Quote Link to comment Share on other sites More sharing options...
boionfire81 Posted April 28, 2016 Author Share Posted April 28, 2016 yeah I saw that with the NPC, but the inactive also has the same issue. He signed up and only came online once or twice. I'm having him login now to see if the error goes away Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted April 28, 2016 Share Posted April 28, 2016 The IP should not have anything to do with when the last time he logged in was. Something must have happened and his IP got messed up in the database Quote Link to comment Share on other sites More sharing options...
boionfire81 Posted May 3, 2016 Author Share Posted May 3, 2016 Well...... I literally just now got this error on my profile...I tried logging out and back in, but yeah same error. AND it's me >.< Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted May 3, 2016 Share Posted May 3, 2016 Look at your IP in the DB and make sure it's a valid address Quote Link to comment Share on other sites More sharing options...
boionfire81 Posted May 4, 2016 Author Share Posted May 4, 2016 IPv4 is good. Not sure how to read IPv6 Quote Link to comment Share on other sites More sharing options...
sniko Posted May 4, 2016 Share Posted May 4, 2016 gethostbyaddr doesn't support IPv6 (and anything that isn't IPv4 format). You don't really need to know the host, really. Either remove this lookup, or use a service like https://fraudguard.io/ Example response from FraudGuard - https://api.fraudguard.io/; [color=#505050]{ [/color] [color=#000000] "isocode":"US", "country":"United States", "state":"CO", "city":"Loveland", "discover_date":"2016-03-18 02:57:40", "threat":"open public proxy", "risk_level":"3" [/color] [color=#505050]}[/color] Quote Link to comment Share on other sites More sharing options...
boionfire81 Posted May 4, 2016 Author Share Posted May 4, 2016 So why was it included in the standard McCodes v2? Quote Link to comment Share on other sites More sharing options...
G7470 Posted May 4, 2016 Share Posted May 4, 2016 So why was it included in the standard McCodes v2? They felt that knowing the host was of some importance to the users of MCC (which it certainly might have been at the time and still might) IPv6 was hardly ever used at the time of MCC v2 release ~G7470 Quote Link to comment Share on other sites More sharing options...
boionfire81 Posted May 4, 2016 Author Share Posted May 4, 2016 hmmm, IPv6 may only be of interest in terms of host, but IPv4 is in the process of being depreciated to IPv6. At least according to some tech news. Quote Link to comment Share on other sites More sharing options...
boionfire81 Posted May 4, 2016 Author Share Posted May 4, 2016 I made this change // $r['lastiph'] = @gethostbyaddr($r['lastip']); // $r['lastiph'] = checkblank($r['lastiph']); // $r['lastip_loginh'] = @gethostbyaddr($r['lastip_login']); // $r['lastip_loginh'] = checkblank($r['lastip_loginh']); // $r['lastip_signuph'] = @gethostbyaddr($r['lastip_signup']); // $r['lastip_signuph'] = checkblank($r['lastip_signuph']); and just deleted the td calls code. But now my profile says Sorry, we could not find a user with that ID, check your source. Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted May 4, 2016 Share Posted May 4, 2016 Returning the host name may show if someone is using a proxy service which may have been a good thing way back in the day when V1/V2 was released. But finding people with proxies may not always be a good thing. Some countries that hate your country may ban access to any IPs registered with your country. So this may give them a chance to play your game. But what sniko suggests is pretty interesting and may be something worth looking into, especially if it's free. Quote Link to comment Share on other sites More sharing options...
boionfire81 Posted May 5, 2016 Author Share Posted May 5, 2016 ok, but in the meantime, I'm stuck here with 2 choices. Have a gethostaddrs error or remove/comment out that part and have an invalid userid. Invalid userid basically leaves me without being able to use the majority of the site. Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted May 5, 2016 Share Posted May 5, 2016 I'm not understanding where the invalid user ID comes in. Because that is taken from the query string. viewuser.php?id=1 Quote Link to comment Share on other sites More sharing options...
boionfire81 Posted May 5, 2016 Author Share Posted May 5, 2016 yes, but it shows invalid id. Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted May 5, 2016 Share Posted May 5, 2016 And if you un-comment that stuff it works fine? Quote Link to comment Share on other sites More sharing options...
boionfire81 Posted May 6, 2016 Author Share Posted May 6, 2016 no, if uncommented, white page with the gethosterror. commented it says invalid id Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted May 6, 2016 Share Posted May 6, 2016 You must have made other changes to the script Quote Link to comment Share on other sites More sharing options...
sniko Posted May 6, 2016 Share Posted May 6, 2016 no, if uncommented, white page with the gethosterror. commented it says invalid id Ugh, you really need to learn how to debug. Quote Link to comment Share on other sites More sharing options...
boionfire81 Posted May 8, 2016 Author Share Posted May 8, 2016 I only installed 1 by [uSER=65371]sniko[/uSER] http://mccodes.com/viewmod.php?id=44 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.