Hi Using socket_read() on windows with PHP_NORMAL_READ (mean read till the next '\n' or '\r'), php always raise an error even when socket still response.
sniffing around a bit: http://cvs.php.net/co.php/php-src/ext/sockets/sockets.c?r=1.165#870 http://cvs.php.net/co.php/php-src/ext/sockets/sockets.c?r=1.165#267 http://cvs.php.net/co.php/php-src/ext/sockets/php_sockets_win.c?r=1.11#97 i see that on with the NORMAL flag, socket_read() is using the php_read() function that always fails due to the php_sockets implementation of the fcntl() call on windows. according to implementation, php_sockets_win.c fcntl always returns -1 for F_GETFD,F_SETFD,F_GETFL flags (unsupported?). the fcntl() call is done to determind if blocking socket for some repeats. my questions are: can't fcntl() be implemented for windows at least to detect the non/blocking thing? else, we may wants just refering to the socket as blocking on win32, this behavior is better just then returning error as now. anyway, if we going to leave this 'behavior' as it, we need to give the windows user fair explain on the function parameters parsing step and on the documentation. more point: on the php.ini.dist i see: 'sockets.use_system_read = On' but without considering the socket_globals definition, there is no ref on the code to this thing, is this directive conected to the above issue? Moshe -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php