ID:               24629
 Updated by:       [EMAIL PROTECTED]
 Reported By:      zparta at skebo dot ac
 Status:           Open
 Bug Type:         Sockets related
 Operating System: FreeBSD 4.8 (Only!)
 PHP Version:      4.3.3RC2-dev
 New Comment:

I tried using fsockopen and stream_select() on the freebsd box, and it
returned false, so also some error happened. Is there a way of giving
out the error msg of the failed stream_select()?



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

[2003-07-13 00:16:43] zparta at skebo dot ac

ok thats to bad :( il just have to wait until its fixed

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

[2003-07-13 00:04:21] [EMAIL PROTECTED]

Works fine with latest CVS of PHP and SmartIRC.
(under Linux, so it's propably yet another FreeBSD-only bug)


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

[2003-07-12 21:10:33] zparta at skebo dot ac

doesnt work with PHP4.3.3RC2-dev either the latest stable from today
php4-STABLE-200307130130

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

[2003-07-12 20:54:32] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip



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

[2003-07-12 20:47:07] zparta at skebo dot ac

Reproduce code:
---------------
$this->_address = 'irc.homelien.no';
$this->_port = '6667';
$this->_socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
$result = @socket_connect($this->_socket, $this->_address,
$this->_port);

        while ($this->_state() == SMARTIRC_STATE_CONNECTED) {
            $this->_checkbuffer();
            
            $timeout = $this->_selecttimeout();
            if ($this->_usesockets == true) {
                $sread = array($this->_socket);
                $result = @socket_select($sread, $w = null, $e = null,
0, $timeout*1000);
                
                if ($result == 1) {
                    // the socket got data to read
                    $rawdata = @socket_read($this->_socket, 10240);
                } else if ($result === false) {
                    // panic! panic! something went wrong!
                    $this->log(SMARTIRC_DEBUG_NOTICE, 'WARNING:
socket_select() returned false, something went wrong! Reason:
'.socket_strerror(socket_last_error()), __FILE__, __LINE__);
                    exit;
                } else {
                    // no data
                    $rawdata = null;
                }
//this code is taken from the Net_SmartIRC class from pear

Expected result:
----------------
Jul 13 03:47:04 SmartIRC.php(1636) WARNING: socket_select() returned
false, something went wrong! Reason: Invalid argument


and the author of Net_SmartIRC has tested this on my machine and he
says that i should bugreport this here because socket_select doesnt
work on freebsd 4.8 dont know if it is version specific.

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

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/24629

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

Reply via email to