PHP 4.0 Bug #9581 Updated: filesystem reading functions (fread, fpassth.)
| From: | mot at warpturbine dot net | Date: | Tue, 06 Mar 2001 17:35:38 +0000 |
| Subject: | PHP 4.0 Bug #9581 Updated: filesystem reading functions (fread, fpassth.) | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-48075@lists.php.net to get a copy of this message | ||
ID: 9581
User Update by: mot@warpturbine.net
Old-Status: Closed
Status: Open
Bug Type: Apache related
Description: filesystem reading functions (fread, fpassth.)
hi jani - that is another way to solve the problem.
in documentation, it's said, that fread is binary safe. so this is a documentation problem.
for the people programming the software it might be good to know, that it only happens in the apache
module, not in the cgi-mode.
thanks for your comments.
--mot
Previous Comments:
---------------------------------------------------------------------------
[2001-03-06 12:04:45] sniper@php.net
You propably missed the 'b' in your fopen() call?
ie. you should use this in Windows:
$fp = fopen ("/home/rasmus/file.gif", "rb");
instead of just 'r'.
--Jani
---------------------------------------------------------------------------
[2001-03-06 10:26:27] mot@warpturbine.net
while running php as an apache module (not cgi-mode) the filesystem functions of php fread and
fpassthrough are not reading the complete file. it skips reading after a number of bytes.
i'm not an apache crack that's why i can't say if this belongs to my apache distro
(1.3.12) or not. but i don't think so.
running in cgi-mode will avoid this problem.
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=9581