php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #51306 gethostbyaddr time limit
Submitted: 2010-03-16 10:01 UTC Modified: 2010-03-16 18:43 UTC
From: ToddWW at Gmail dot com Assigned:
Status: Duplicate Package: Network related
PHP Version: 5.2.13 OS: CentOS
Private report: No CVE-ID: None
 [2010-03-16 10:01 UTC] ToddWW at Gmail dot com
Description:
------------
When using gethostbyaddr with an IP it will return a host name just what we want. However, if there is no host name to return it stalls and takes 20-30 seconds PER IP lookup. If it CAN return a host name it does so in <1 second.

Example - I can loop through 5 IPs that resolve to hostnames in .7 seconds. This includes database calls, and updates.

Example 2 - I can loop through 5 IPs that DO NOT resolve to hostnames in 3 minutes!!! 

This needs to be fixed, or a second parameter option for max look-up time per-ip.

gethostbyaddr(IP,Max_Execution_Time) as example.



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-03-16 10:08 UTC] aharvey@php.net
-Status: Open +Status: Duplicate -Package: Performance problem +Package: Network related
 [2010-03-16 10:08 UTC] aharvey@php.net
Already requested in bug #12802.
 [2010-03-16 18:43 UTC] ToddWW at Gmail dot com
Considering that was almost 10 years ago and no fix I thought we might want to get this taken care of. It seems like a very simple fix.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC