|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20553 socket error codes are not initialized upon socket creation
Submitted: 2002-11-21 17:46 UTC Modified: 2003-02-20 07:59 UTC
Avg. Score:3.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: dweller at devonweller dot com Assigned:
Status: No Feedback Package: Sockets related
PHP Version: 4.3.0RC1 OS: Mac OS X
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2002-11-21 17:46 UTC] dweller at devonweller dot com
In php4.3.0RC2:

When a new socket is created, the current error code for 
that socket is not initialized to 0.  I recommend that it 
should be.  The following code outputs:

error: 1313166380: Unknown error: 1313166380

The value changes from time to time.


if ($listener_sock = socket_create(AF_INET, SOCK_STREAM, 
	if ($error_code = socket_last_error($listener_sock)) {
    echo "error: $error_code: " . socket_strerror 



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-13 19:44 UTC]
Please try using this CVS snapshot:
For Windows:

can't reproduce..

 [2003-02-20 07:59 UTC]
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 "Open". Thank you.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Jun 14 19:01:30 2024 UTC