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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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: Sat Dec 21 16:01:28 2024 UTC