Jump to content

Recommended Posts

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 ?
Link to comment
https://forums.phpfreaks.com/topic/4755-gettin-this-warning/
Share on other sites

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
Link to comment
https://forums.phpfreaks.com/topic/4755-gettin-this-warning/#findComment-16769
Share on other sites

[!--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'] )
Link to comment
https://forums.phpfreaks.com/topic/4755-gettin-this-warning/#findComment-16788
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.