|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #71641 Proper error-reporting in php_network_addresses() calls
Submitted: 2016-02-22 09:31 UTC Modified: -
Avg. Score:4.0 ± 1.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:-1 (-100.0%)
From: torotil at gmail dot com Assigned:
Status: Open Package: Streams related
PHP Version: master-Git-2016-02-22 (Git) OS: all
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
33 - 32 = ?
Subscribe to this entry?

 [2016-02-22 09:31 UTC] torotil at gmail dot com
In php_network_addresses() getaddrinfo() is called but only it's return value is checked for errors. For EAI_SYSTEM it only reports a generic error although a more specific error message is available using strerror(errno). This makes debugging certain networking issues impossible.

I'd propose to check for EAI_SYSTEM like in this stackoverflow question:


71641-proper-errors-for-getaddrinfo-php55.patch (last revision 2016-02-22 10:16 UTC by torotil at gmail dot com)
7 (last revision 2016-02-22 10:15 UTC by torotil at gmail dot com)

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2016-02-22 09:58 UTC] torotil at gmail dot com
Here is a patch for the current PHP-5.5 branch.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Mon Dec 04 23:01:27 2023 UTC