From: vnegrier at esds dot com Operating system: Linux 2.4 PHP version: 5.0.2 PHP Bug Type: Sockets related Bug description: STREAM_CLIENT_ASYNC_CONNECT not working
Description: ------------ when I use the STREAM_CLIENT_ASYNC_CONNECT flag to my stream_socket_client() call, it just doesn't connect() at all. Reproduce code: --------------- <? echo "trying ...\n"; stream_socket_client("tcp://127.0.0.1:80", $errno, $errstr, 10, STREAM_CLIENT_ASYNC_CONNECT); sleep(10); ?> Actual result: -------------- using strace on the following script gives : -------------------------------------------- write(1, "trying ...\n", 11trying ... ) = 11 rt_sigprocmask(SIG_BLOCK, [CHLD], [RTMIN], 8) = 0 rt_sigaction(SIGCHLD, NULL, {SIG_DFL}, 8) = 0 rt_sigprocmask(SIG_SETMASK, [RTMIN], NULL, 8) = 0 nanosleep({10, 0}, {10, 0}) = 0 -------------------------------------------- in other words the connect() syscall is never called at all between the echo and sleep. on the other hand, when I remove STREAM_CLIENT_ASYNC_CONNECT, connect() is called. -- Edit bug report at http://bugs.php.net/?id=30386&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30386&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30386&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30386&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=30386&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=30386&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=30386&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=30386&r=needscript Try newer version: http://bugs.php.net/fix.php?id=30386&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=30386&r=support Expected behavior: http://bugs.php.net/fix.php?id=30386&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=30386&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=30386&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=30386&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30386&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=30386&r=dst IIS Stability: http://bugs.php.net/fix.php?id=30386&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=30386&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=30386&r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=30386&r=mysqlcfg