note 40750 deleted from function.readfile by nlopess
| From: | nlopess@php.net | Date: | Sat, 13 Mar 2004 21:31:04 +0000 |
| Subject: | note 40750 deleted from function.readfile by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-66780@lists.php.net to get a copy of this message | ||
Note Submitter: erojas101@hotmail.com
----
Problems with Apache-AdvancedExtranetServer/2.0.47 (Mandrake Linux/6mdk) mod_ssl/2.0.47
OpenSSL/0.9.7b PHP/4.3.2.
When I use @readline($fp) to print a file ( $fp = getFilePath($file);) for download it, sometimes I
get a segmentation fault message in the error_log file (as I could see, it's related with some
specific file sizes, 22016 bytes in my case).
I solved the problem replacing by the following code:
$fph=fopen($fp,"r");
$contents = fread ($fph, filesize($fp));
fclose($fph);
echo $contents;