PHP 4.0 Bug #9373: Filesystem read not binary safe?
| From: | auke at muze dot nl | Date: | Wed, 21 Feb 2001 14:05:31 +0000 |
| Subject: | PHP 4.0 Bug #9373: Filesystem read not binary safe? | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-47145@lists.php.net to get a copy of this message | ||
From: auke@muze.nl
Operating system: Windows NT
PHP version: 4.0.4pl1
PHP Bug Type: Filesystem function related
Bug description: Filesystem read not binary safe?
Running PHP 4.0.4pl1 as an apache module (php4apache.dll)
When reading and writing files using any function except include() and require() the reading and
writing seems to stop whenever a char(0) is encountered... I'm not exactly sure that is what
happens, but textfiles are read and written without problems, binary files are cut short.
e.g.:
<?php
readfile("someimage.gif");
?>
delivers only a small part of the image, resulting in a broken image tag (usually) or the top part
of the image (sometimes). Whereas:
<?php
include("someimage.gif");
?>
does deliver the entire image (or a parse error :)
--
Edit Bug report at: http://bugs.php.net/?id=9373&edit=1