php.net |  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
Votes:1
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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: dweller at devonweller dot com
New email:
PHP Version: OS:

 

 [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.

<?php

if ($listener_sock = socket_create(AF_INET, SOCK_STREAM, 
SOL_TCP)) {
	if ($error_code = socket_last_error($listener_sock)) {
    echo "error: $error_code: " . socket_strerror 
($error_code)."\n";
	}
}


?>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-13 19:44 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

can't reproduce..

 [2003-02-20 07:59 UTC] sniper@php.net
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 Apr 26 10:01:31 2024 UTC