Date: 11/01/00
- Next message: mog <email protected>: "[PHP-DEV] PHP 4.0 Bug #7578: next() and current() do not return referenceing arrays"
- Previous message: David Hedbor: "[PHP-DEV] Re: do_exit name clash"
- In reply to: Mitch Vincent: "[PHP-DEV] Socket() Error"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> PHP 4.0.3pl1 on a SMP Linux box with Kernel 2.2.16 --
>
> Anytime I try to call socket() like :
>
> socket (AF_INET, SOCK_STREAM,0)
>
> I get :
>
> Call to socket() failed: reason: Unknown error 4294967293
Are you looking for a non-zero return from socket or a negative return
from socket? The function has pretty much the same semantics as the
socket(2) system call, except for the return value is the opposite of the
errno value.
Try code that looks like:
$fd = socket(AF_INET, SOCK_STREAM, 0);
if ($fd < 0) { // socket() *can* return 0.
print "Call to socket() failed: reason: " . strerror($fd) . "\n";
exit;
}
Chris
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: mog <email protected>: "[PHP-DEV] PHP 4.0 Bug #7578: next() and current() do not return referenceing arrays"
- Previous message: David Hedbor: "[PHP-DEV] Re: do_exit name clash"
- In reply to: Mitch Vincent: "[PHP-DEV] Socket() Error"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

