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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
47 + 42 = ?
Subscribe to this entry?

 
 [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 May 10 22:01:32 2024 UTC