#22656 [Bgs->Opn]: socket_set_blocking() won't work?

2003-03-12 Thread thejoshes at josh dot com
 ID:   22656
 User updated by:  thejoshes at josh dot com
 Reported By:  thejoshes at josh dot com
-Status:   Bogus
+Status:   Open
 Bug Type: Sockets related
 Operating System: OS X 10.2.3
 PHP Version:  4.3.1
 New Comment:

Interesting. When I use socket_set_nonblock($s); instead, I get the
following error, repeatedly:

Warning:  socket_accept() unable to accept incoming connection
[35]: Resource temporarily unavailable in
/Users/josha/test/noblock.php on line 27


Previous Comments:


[2003-03-12 03:29:39] [EMAIL PROTECTED]

I was going to suggest reading the manual, however this point is not
made clear:

socket_set_blocking() has nothing to do with the sockets extension, and
that is the reason that we changed its name:

http://www.php.net/manual/en/function.socket-set-blocking.php

http://www.php.net/manual/en/function.stream-set-blocking.php

To acheive non-blocking "ext/sockets", you need to call this function:
http://www.php.net/manual/en/function.socket-set-nonblock.php



[2003-03-12 02:32:21] thejoshes at josh dot com

The following script produces this error:

Warning:  socket_set_blocking(): supplied resource is not a
valid stream resource in /Users/josha/test/noblock.php on line
10

Even though the socket connection will work fine... I expect this to
work, since $s is indeed a valid stream resource, right?

#!/usr/local/bin/php





-- 
Edit this bug report at http://bugs.php.net/?id=22656&edit=1



#22656 [NEW]: socket_set_blocking() won't work?

2003-03-12 Thread thejoshes at josh dot com
From: thejoshes at josh dot com
Operating system: OS X 10.2.3
PHP version:  4.3.1
PHP Bug Type: Sockets related
Bug description:  socket_set_blocking() won't work?

The following script produces this error:

Warning:  socket_set_blocking(): supplied resource is not a valid
stream resource in /Users/josha/test/noblock.php on line
10

Even though the socket connection will work fine... I expect this to work,
since $s is indeed a valid stream resource, right?

#!/usr/local/bin/php

-- 
Edit bug report at http://bugs.php.net/?id=22656&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=22656&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=22656&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=22656&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=22656&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=22656&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=22656&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=22656&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=22656&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=22656&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=22656&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22656&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=22656&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=22656&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=22656&r=gnused