Req #45952 [Com]: Timeout need for gethostbyname()

From: Date: Thu, 04 Mar 2010 15:35:35 +0000
Subject: Req #45952 [Com]: Timeout need for gethostbyname()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-148251@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=45952&edit=1

 ID:               45952
 Comment by:       
 Reported by:      shefik at allknightaccess dot com
 Summary:          Timeout need for gethostbyname()
 Status:           Open
 Type:             Feature/Change Request
 Package:          Feature/Change Request
 Operating System: Linux
 PHP Version:      5.2.6

 New Comment:

bump


Previous Comments:
------------------------------------------------------------------------
[2008-08-29 18:07:18] 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?



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



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


Thread (3 messages)

« previous php.bugs (#148251) next »