#34258 [NEW]: Problems with download

From: Date: Thu, 25 Aug 2005 19:44:23 +0000
Subject: #34258 [NEW]: Problems with download
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-83994@lists.php.net to get a copy of this message
From: sillva at gmail dot com Operating system: Linux 2.4 PHP version: 4.4.0 PHP Bug Type: Unknown/Other Function Bug description: Problems with download Description: ------------ Hi, I think know a bug in php, i have an file in folder (/home/user/file/file.ext), when i try download (with my script), the php insert a "\n" at start of the file. I try to remove the \n, dont resolve the problem. I'm sorry for my bad english. If this is not bug ... sorry ... i try find a solution in the google but not happen. Reproduce code: --------------- header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Cache-Control: private",false); header("Content-Type: $ctype"); header("Content-Disposition: attachment; filename=\"".$nm_layout."\";"); header("Content-Transfer-Encoding: binary"); header("Content-Length: ".$tm_layout); set_time_limit(0); readerfile($bn_layout); /* the variables have a value, the download is finished and all the content of the file is correct, but the "\n" broken the file */ Expected result: ---------------- Correct file content Actual result: -------------- Correct file content but with "\n" at start. -- Edit bug report at http://bugs.php.net/?id=34258&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34258&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34258&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34258&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=34258&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=34258&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=34258&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=34258&r=needscript Try newer version: http://bugs.php.net/fix.php?id=34258&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=34258&r=support Expected behavior: http://bugs.php.net/fix.php?id=34258&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=34258&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=34258&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=34258&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34258&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=34258&r=dst IIS Stability: http://bugs.php.net/fix.php?id=34258&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=34258&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=34258&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=34258&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=34258&r=mysqlcfg

« previous php.bugs (#83994) next »