note 40750 added to function.readfile

From: Date: Fri, 12 Mar 2004 23:23:09 +0000
Subject: note 40750 added to function.readfile
Groups: php.notes 
Request: Send a blank email to php-notes+get-66759@lists.php.net to get a copy of this message
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; ---- Manual Page -- http://www.php.net/manual/en/function.readfile.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+40750 Delete -- http://master.php.net/manage/user-notes.php?action=delete+40750&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+40750&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#66759) next »