Re: gethostbyaddr error
| From: | php3 at developersdesk dot com | Date: | Mon, 26 Jun 2000 23:18:57 +0000 |
| Subject: | Re: gethostbyaddr error | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-3221@lists.php.net to get a copy of this message | ||
Addressed to: Thomas Deliduka <thomas@neweve.com>
php-general@lists.php.net
>
> Now, do you think it could be my error reporting level in my php.ini
> file?
Maybe I'm just a masochist, but I believe you should keep the error
reporting level set for max warnings, and fix the code where the
warnings appear. After you have done this for a week or two you will
find that you write code that doesn't throw warnings by habbit. Once
that happens you will find that most of the warnings you do get are
places where you screwed up.
As far as making the warning go away on
$address = gethostbyaddr($ip);
Have you tried:
$Address = @gethostbyaddr( $IP );
if( !isset( $Address )) $Address = $IP;
The @ supresses the warning on only the gethostbyaddr call. Note, this
is not tested, maybe you need to use:
@$Address = gethostbyaddr( $IP );
One way or another @ is the way to supress warnings on a single action
where you know that the warning is normal.
Rick Widmer
Internet Marketing Specialists
www.developersdesk.com