php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13423 gethostbyname() returns hostname when ip address is part of hostname
Submitted: 2001-09-24 18:12 UTC Modified: 2002-06-15 09:24 UTC
From: gardner at armory dot com Assigned:
Status: Closed Package: Unknown/Other Function
PHP Version: 4.0.4pl1 OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: gardner at armory dot com
New email:
PHP Version: OS:

 

 [2001-09-24 18:12 UTC] gardner at armory dot com
When you pass a host name such as ip-255-255-255-255.reverse.mobilenetics.com to gethostbyname() it returns the hostname, not the ip address.

Regular hostnames like google.com work.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-09-24 18:34 UTC] jimw@php.net
actually, what is going on is that php's gethostbyname() simply returns the name when it can't be resolved. (that seems like rather silly behavior to me, and is probably worth changing.)
 [2002-06-15 09:24 UTC] derick@php.net
It might be silly behavior... but we can not change this now due to BC issues.

Derick
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 04 08:01:29 2024 UTC