[PHP-DOC] Bug #7576 Updated: socket() always fails with an "Unknown error" From: danbeck <email protected>
Date: 06/27/01

ID: 7576
Updated by: danbeck
Reported By: mitch <email protected>
Old-Status: Analyzed
Status: Closed
Bug Type: Documentation problem
Operating system:
PHP Version: 4.0.3pl1
Assigned To:
Comments:

This behaviour has already been documented, including the reference to the socket(2) man page.

Previous Comments:
---------------------------------------------------------------------------

[2000-11-01 18:51:09] chrisv <email protected>
Read your local man page on socket(2). Most of the functions in the sockets extension return >= 0 on success and < 0 on error.

Reclassified as a documentation problem.

Docs writers: feel free to bug me on the semantics of the functions in the module and such :)

---------------------------------------------------------------------------

[2000-11-01 18:07:20] mitch <email protected>
Something like

if ( ($iSockFD = socket (AF_INET, SOCK_STREAM,0) ) != 0) {
        print "Call to socket() failed: reason: " . strerror ($iSockFD) . "n";
        exit();
}

That results in an "Unknown error 4294967293" message from strerror() in Linux kernel 2.2.16.. A "Unknown error: -3" in FreeBSD 4.0 -- no matter what user I am, this error occurs on both operating systems..

---------------------------------------------------------------------------

ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=7576&edit=2