|  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
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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: shefik at allknightaccess dot com
New email:
PHP Version: OS:


 [2008-08-29 18:07 UTC] shefik at allknightaccess dot com
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 state "Returns 
the IP address or a string containing the unmodified hostname on 

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?


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-03-04 16:35 UTC] tyra3l at gmail dot com
 [2010-03-04 16:58 UTC]
-Status: Open +Status: Duplicate
 [2010-03-04 16:58 UTC]
Dupe of the aforementioned bug #12802.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Jul 24 02:01:29 2024 UTC