![]() |
gethostbyaddr
I am getting a error for this new site I am making. here is the error. I have never seen this kind of error. So I do not know what to do.
Warning: gethostbyaddr() [function.gethostbyaddr]: Address is not a valid IPv4 or IPv6 address in /home1/clubbink/public_html/streetlords/signup.php on line 62 Code:
$host=gethostbyaddr("$REMOTE_ADDR"); |
php Code:
The $REMOTE_ADDR method you're using is a really old way. I think that's attempting to use super-globals. I used them only once when freelancing at one particular place. |
Quote:
|
It is an apache server plugin all you will need to do is put a double slash in front of it. So it should look like this.
PHP Code:
|
What will that do but comment it out?
|
Yes so it does not show the error or at top of html.php put error_reporting (0) This will shut off all errors
|
I don't understand what you're attempting to do here. Double forward slash is a comment and therefore won't get executed at all, right?
php Code:
Quote:
|
Quote:
I think the OP wants his code to run but not give an error. If he didnt want the statement there he simply would've deleted it. |
I do not know much about the plugin. It is a older script I do not know the creator. I could not tell you what it is doing there. But I did read somewhere that putting the double slash will block it out so that it will not show.
|
I understand that, in PHP that means a comment. You use it to document your code.
PHP Code:
For the sake of explaining it to this guy, I am gonna pretend PHP is compiled. Okay, so when you run your script, your statements get converted into machine code. However when the compiler see's double slashes then it ignores that line. Similarly you can comment a "block" by using /* and */. Anything inbetween is not seen by the compiler as runnable code so it skips it. If your script depends on that statement, then the whole script will fail because now you are NOT executing the statement. Just to be on the safe side, you should uncomment it and use the suggestion given above. I am assuming your new so you couldnt possibly debug where that variable is being used and how. So just uncomment it. If the script needs it then it will use it, if it dosnt well I think PHP has a garbage collector that will free the memory after. |
Welcome to mmoggg website to buy RS Gold, offer a lot, of course, Diablo 3 Gold and Cheap RS Gold, to be purchased at any time, at any time shipment, and Diablo 3 Gold Kaufen look forward to your visit!
|
| All times are GMT. The time now is 05:29 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0