Req #30699 [Fbk->NoF]: Have gethostbyname return error information in additional variables
| From: | php-bugs at lists dot php dot net | Date: | Tue, 30 Dec 2014 10:41:27 +0000 |
| Subject: | Req #30699 [Fbk->NoF]: Have gethostbyname return error information in additional variables | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-189378@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=30699&edit=1
ID: 30699
Updated by: php-bugs@lists.php.net
Reported by: techtonik@php.net
Summary: Have gethostbyname return error information in
additional variables
-Status: Feedback
+Status: No Feedback
Type: Feature/Change Request
Package: Network related
Operating System: Irrelevant
PHP Version: *
Private report: N
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2014-04-21 20:25:02] levim@php.net
At a glance I was unable to find any update to this; is this something you are still interested in?
------------------------------------------------------------------------
[2004-11-06 11:21:20] techtonik@php.net
Description:
------------
It will be helpful to make gethostbyname return error status in additional variables like fsockopen
does for example in int &errno, string &errstr.
Now gethostbyname returns a string containing the unmodified hostname on failure, but rather often
it is desirable to know why the operation failed and output standart system text error message
without inventing own ones. That way you can search information on internet with a higher
probability to find an answer in case of errors.
It should not be too difficult to implement since WSAGetLastError() from WinSock2 returns generic
error code and here you can find error code descriptions.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/winsock/windows_sockets_error_codes_2.asp
Expected result:
----------------
string gethostbyname ( string hostname[, int &errno [, string &errstr]] )
Actual result:
--------------
string gethostbyname ( string hostname )
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=30699&edit=1