Re: Re: Fixing socket reads
| From: | Ilia A. | Date: | Fri, 04 Oct 2002 19:10:33 +0000 |
| Subject: | Re: Re: Fixing socket reads | ||
| References: | 1 2 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-89024@lists.php.net to get a copy of this message | ||
On October 4, 2002 02:14 pm, Stefan Esser wrote:
> Just wanted to say that I just tested ftp_fopen wrappers
> and whatever was added/modified in the stream code
> since i added ftps_fopen wrapper a few weeks ago
> must have broken it badly. Right now the gets() simply
> blocks... That was not the case a few weeks ago...
>
> Stefan
That is likely to happen for the same reason as http://bugs.php.net/19746,
regardless of the user specified limit the streams code tries to read 8192
bytes. If the data supplied is over an active stream, such stdin and there is
no EOF and less then 8192 bytes to data to read, fread() and fgets() will
block indefinitely.
I have just committed a patch that fixes the problem demonstrated in the above
mentioned bug report. It is highly likely It'll fix the problem you are
experiencing as well.
ilia