php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #45952 Timeout need for gethostbyname()
Submitted: 2008-08-29 18:07 UTC Modified: 2010-03-04 16:58 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:2 (100.0%)
From: shefik at allknightaccess dot com Assigned:
Status: Duplicate Package: Feature/Change Request
PHP Version: 5.2.6 OS: Linux
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: shefik at allknightaccess dot com
New email:
PHP Version: OS:

 

 [2008-08-29 18:07 UTC] shefik at allknightaccess dot com
Description:
------------
When using the function gethostbyname(), a script can hang 
indefinitely if the host being queried is down or currently having 
name server failures.

Therefore, a timeout is needed for this function, so the script can 
continue executing, instead of being stuck at trying to reach an 
inaccessible host. 

I know the docs at 
http://us3.php.net/manual/en/function.gethostbyname.php state "Returns 
the IP address or a string containing the unmodified hostname on 
failure."

but the the hostname is having dns/nameserver failures at the time of 
query, then the hostname does not get returned on failure. the script 
will hang at this function.

I am using PHP 5.2.6. How come bug #12802 is still open and not 
getting addressed? This bug was originally submitted Aug 16, 2001. It 
is now Aug 29, 2008. 7 years later and still the same bug!!! Why is 
this bug being ignored for so long?


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-03-04 16:35 UTC] tyra3l at gmail dot com
bump
 [2010-03-04 16:58 UTC] aharvey@php.net
-Status: Open +Status: Duplicate
 [2010-03-04 16:58 UTC] aharvey@php.net
Dupe of the aforementioned bug #12802.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 00:01:28 2024 UTC