php.net |  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: -
Votes:2
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 Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: torotil at gmail dot com
New email:
PHP Version: OS:

 

 [2016-02-22 09:31 UTC] torotil at gmail dot com
Description:
------------
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: http://stackoverflow.com/a/17914614/769486


Patches

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)

Pull Requests

History

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-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 14 05:01:26 2024 UTC