By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,983 Members | 1,717 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,983 IT Pros & Developers. It's quick & easy.

PHP and gethostbyaddr

P: n/a
I have a PHP script which contain the following code:

$hostname = gethostbyaddr ($ip);

Until yesterday, the gethostbyaddr returned the hostname of the given
IP-addresse. But yesterday it began to return the name of the host the
web-server is running on regardless of the given IP. If I do a 'host <IP>'
from a shell on the same machine, I get the correct hostname.

I have tried to restart the web-server (Apache 2.0) without luck.

Any hints about what's wrong? Do I need to kick the OS in the CPU (reboot)?

Jørn Dahl-Stamnes
Jun 15 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.