From: [EMAIL PROTECTED]
Operating system: Mac OS X
PHP version: 4.3.0RC1
PHP Bug Type: Sockets related
Bug description: socket error codes are not initialized upon socket creation
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";
}
}
?>
--
Edit bug report at http://bugs.php.net/?id=20553&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=20553&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=20553&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=20553&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=20553&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=20553&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=20553&r=support
Expected behavior: http://bugs.php.net/fix.php?id=20553&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=20553&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=20553&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=20553&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20553&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=20553&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=20553&r=isapi