Bug #16170: Apache error fread() fopen()
| From: | areyelt at web dot de | Date: | Tue, 19 Mar 2002 18:16:47 +0000 |
| Subject: | Bug #16170: Apache error fread() fopen() | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-2896@lists.php.net to get a copy of this message | ||
From: areyelt@web.de
Operating system: w2k
PHP version: 4.1.2
PHP Bug Type: Apache related
Bug description: Apache error fread() fopen()
System:
w2k PROF
Apache/1.3.23
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);
}
fclose($fp);
OR:
$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?
--
Edit bug report at http://bugs.php.net/?id=16170&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=16170&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=16170&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=16170&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=16170&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16170&r=support
Expected behavior: http://bugs.php.net/fix.php?id=16170&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16170&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16170&r=submittedtwice