#31966 [Opn]: SSL:// wrapper does not obey NON_BLOCKING mode.

From: Date: Mon, 14 Feb 2005 10:20:25 +0000
Subject: #31966 [Opn]: SSL:// wrapper does not obey NON_BLOCKING mode.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-74034@lists.php.net to get a copy of this message
ID: 31966 User updated by: james-php at bytehosting dot com Reported By: james-php at bytehosting dot com Status: Open Bug Type: *Network Functions Operating System: linux PHP Version: 4.3.10 New Comment: opps -- stream_set_blocking() ~james Previous Comments: ------------------------------------------------------------------------ [2005-02-14 11:15:36] james-php at bytehosting dot com 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 this bug report at http://bugs.php.net/?id=31966&edit=1

« previous php.bugs (#74034) next »