|  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
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.
Bug Type:
From: ToddWW at Gmail dot com
New email:
PHP Version: OS:


 [2010-03-16 10:01 UTC] ToddWW at Gmail dot com
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.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-03-16 10:08 UTC]
-Status: Open +Status: Duplicate -Package: Performance problem +Package: Network related
 [2010-03-16 10:08 UTC]
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-2020 The PHP Group
All rights reserved.
Last updated: Fri Oct 30 19:01:25 2020 UTC