ID:               39074
 User updated by:  webmaster at smiliz dot info
 Reported By:      webmaster at smiliz dot info
-Status:           Feedback
+Status:           Open
 Bug Type:         Unknown/Other Function
 Operating System: Windows XP
 PHP Version:      5.2.0RC5
 New Comment:

I'm test PHP Version 5.2.0RC6-dev
And this code running :
<?
$SERVER_NAME = $_SERVER["SERVER_NAME"];
$IP = gethostbyname($SERVER_NAME);
$server = gethostbyaddr($IP);
echo "<br>Server IP: $IP";
echo "<br>Server Name: $server"; 
?>

gethostbyaddr return expected result.

Thank you.


Previous Comments:
------------------------------------------------------------------------

[2006-10-18 20:53:04] [EMAIL PROTECTED]

Can't reproduce.
C:\php -r "var_dump(gethostbyname('wanadoo.fr'));"
string(15) "193.252.122.103"

C:\php -r "var_dump(gethostbyaddr('193.252.122.103'));"
string(25) "hpwoo.wanadooportails.com"


------------------------------------------------------------------------

[2006-10-07 18:46:06] webmaster at smiliz dot info

I'm test PHP 5.2RC5 whith apache 1.3.37.
getHostByAddr return correctly Host => wanadoo.fr

But, i'm test PHP 5.2 RC5 with Apache 2.2.3 on the same server and =>
getHostByAddr not return host

------------------------------------------------------------------------

[2006-10-07 18:35:16] webmaster at smiliz dot info

yes is work.
nslookup xxx.xxx.xxx.xxx

return =>
Serveur : xxxxxxxxxx
Address: xxx.xxx.xxx.xxx
etc...

------------------------------------------------------------------------

[2006-10-07 18:09:36] [EMAIL PROTECTED]

Does `nslookup <ip addr>` work for you?

------------------------------------------------------------------------

[2006-10-07 13:34:14] webmaster at smiliz dot info

I'm verify working dns on my server computer -> OK !
I'm try with php CLI -> getHostByAddr not return host !
But in localhost, getHostByAddr return localhost.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/39074

-- 
Edit this bug report at http://bugs.php.net/?id=39074&edit=1

Reply via email to