From: james-php at bytehosting dot com
Operating system: linux
PHP version: 4.3.10
PHP Bug Type: *Network Functions
Bug description: SSL:// wrapper does not obey NON_BLOCKING mode.
Description:
------------
When php is compiled against openssl. If you use a non_blocking stream PHP
does not obet the non_blocking options. If you REMOVE the ssl:// and
connect to a non-secure port, and it works perfectly fine.
OpenSSL 0.9.7e
PHP 4.3.10 (cgi-fcgi) (built: Dec 27 2004 04:01:15)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
Kernel: 2.4.22-36mdkenterprise
Mandrake Linux release 9.2 (FiveStar) for i586
Dual xeon + hyperthreading:
model name : Intel(R) Xeon(TM) CPU 2.40GHz
stepping : 9
cpu MHz : 2389.117
cache size : 512 KB
./configure --enable-fastcgi --with-mysql --enable-aspell --enable-ftp
--enable-xml --enable-trans-sid --enable-curl \
--enable-force-cgi-redirect --with-gd --with-zlib-dir
--with-curl=/usr/include/curl --with-openssl \
--with-openssl-dir=/usr/compile/openssl-0.9.7e
Reproduce code:
---------------
<?
$fd = fsockopen("ssl://server.com","5557");
set_stream_blocking($fd,FALSE);
$buff = fgets($fd);
echo "You will never see this, as fgets hangs forever.";
?>
Expected result:
----------------
Socket to be non-blocked, and return immediately.
--
Edit bug report at http://bugs.php.net/?id=31966&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31966&r=trysnapshot4
Try a CVS snapshot (php5.0):
http://bugs.php.net/fix.php?id=31966&r=trysnapshot50
Try a CVS snapshot (php5.1):
http://bugs.php.net/fix.php?id=31966&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=31966&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=31966&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=31966&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=31966&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=31966&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=31966&r=support
Expected behavior: http://bugs.php.net/fix.php?id=31966&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=31966&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=31966&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=31966&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31966&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=31966&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=31966&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=31966&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=31966&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=31966&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=31966&r=mysqlcfg