dalmaca Posted March 12, 2006 Share Posted March 12, 2006 i am runnign a website witch is up and running fine... decided to make a new site running the same script but slight changes ( layout / theme ect)anyway i got another webserver ( the same as the real site is running, same host, same package ect )but on the new site when i upload the sctrip and goto sign up i get this error[code]Warning: gethostbyaddr(): Address is not a valid IPv4 or IPv6 address in / [/code]any ideas ? Quote Link to comment Share on other sites More sharing options...
hitman6003 Posted March 12, 2006 Share Posted March 12, 2006 Apparently your not passing a valid IP address to your gethostbyaddr function.There's no way we can help you beyond that point without seeing the code for at least that function. Quote Link to comment Share on other sites More sharing options...
dalmaca Posted March 12, 2006 Author Share Posted March 12, 2006 this is where it says the error is ....[code]$host=gethostbyaddr("$REMOTE_ADDR"); <<<<<<<<<THIS LINE$getbans =mysql_query("SELECT banned FROM $tab[banned];");$bans = array();while($ban=mysql_fetch_array($getbans)) { array_push($bans, $ban[0]);[/code]the error on that line just thought id better post that whole section as it might of been needed Quote Link to comment Share on other sites More sharing options...
AndyB Posted March 12, 2006 Share Posted March 12, 2006 Give this a shot ... and/or print the remote_addr to see if you're getting something that makes sense.[code]$host=gethostbyaddr($_SERVER['REMOTE_ADDR']);[/code] Quote Link to comment Share on other sites More sharing options...
dalmaca Posted March 12, 2006 Author Share Posted March 12, 2006 well the warning gone now , but it doesnt seem to let me goto step 2 ps its a sign up page , buti think thats sumthing my end ( on server its self)Thnx Quote Link to comment Share on other sites More sharing options...
phporcaffeine Posted March 12, 2006 Share Posted March 12, 2006 [!--quoteo(post=354302:date=Mar 12 2006, 04:11 PM:name=dalmaca)--][div class=\'quotetop\']QUOTE(dalmaca @ Mar 12 2006, 04:11 PM) [snapback]354302[/snapback][/div][div class=\'quotemain\'][!--quotec--]well the warning gone now , but it doesnt seem to let me goto step 2 ps its a sign up page , buti think thats sumthing my end ( on server its self)Thnx[/quote]$REMOTE_ADDR is a depriciated variable aside from the fact that there are several directives in PHP.INI that can stop vars like this. I imagine that you do not have access to PHP.INI on this server so you could try to pass the register_globals directive with ini_set if the host allows.Your other option is to use the $_SERVER array as mentioned above. ( $_SERVER['REMOTE_ADDR'] ) 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.