|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16170 Apache error fread() fopen()
Submitted: 2002-03-19 13:16 UTC Modified: 2002-07-10 23:56 UTC
Avg. Score:4.9 ± 0.3
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: areyelt at web dot de Assigned:
Status: Not a bug Package: Filesystem function related
PHP Version: 4.1.2 OS: w2k
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: areyelt at web dot de
New email:
PHP Version: OS:


 [2002-03-19 13:16 UTC] areyelt at web dot de
w2k PROF
PHP 4.12

My Apache crashes with error code:

[Tue Mar 19 19:09:47 2002] [info] master_main: Child processed exited prematurely. Restarting the child process.
[Tue Mar 19 19:09:47 2002] [info] Parent: Created child process 1080
[Tue Mar 19 19:09:47 2002] [info] Parent: Duplicating socket 484 and sending it to child process 1080
[Tue Mar 19 19:09:47 2002] [info] BytesRead = 372 WSAProtocolInfo = 2006620

reason is:

$filename = "d:\\web\\kontakt\\test.jpg";
$fp = fopen($filename, "rb"); 
while(!feof($fp)) { 
  $attachment .= fread($fp, 1024); 

$filename = "d:\\web\\kontakt\\test.jpg";
$fd = (fopen($filename, "rb"));
$attachment = addslashes(fread($fd, filesize($filename)));
fclose ($fd);

There's no problem on a Linux System.

What should i do?


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-20 06:48 UTC] areyelt at web dot de
i think the problem is filesystme function related
 [2002-07-10 23:56 UTC]
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Jun 12 15:01:23 2021 UTC