Bug #13443 Updated: gethostbyname returns the name not the IP addr.

From: Date: Tue, 25 Sep 2001 21:16:30 +0000
Subject: Bug #13443 Updated: gethostbyname returns the name not the IP addr.
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-66602@lists.php.net to get a copy of this message
ID: 13443 User updated by: brooks@netgate.net Reported By: brooks@netgate.net Status: Duplicate Bug Type: Unknown/Other Function Operating System: BSDI 4.1 PHP Version: 4.0.6 New Comment: IMHO this is not the same as #13423, which is why I didn't list it in the original report. Although the data returned is the same (hostname instead of IP address) the reason for the failure is seems very different. Previous Comments: ------------------------------------------------------------------------ [2001-09-25 16:45:51] jimw@php.net duplicate of 13423, among the others listed in the report. gethostbyname() returns the hostname it is passed when the C-level gethostbyname() call fails. ------------------------------------------------------------------------ [2001-09-25 16:22:34] brooks@netgate.net This is basically the same report as 8754, 12678, and 8856. The gethostbyname function returns the name instead of the IP address. The host is configured correctly and names can be resolved from the shell using nslookup, dig, etc. This bug first appeared in 4.0.4 (although I didn't know it until now) and is present in 4.0.6 and 4.0.8-dev (php4-200109251335.tar.gz - latest from the snapshots dir as of 9/26/01). I regressed the bug back to my previous version of 3.0.14 and the bug is not present in that version. I have tried both gethostbyname (returns the name) and gethostbynamel (returns 0 items in the array). ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=13443&edit=1

« previous php.dev (#66602) next »