note 24332 deleted from function.header by sniper

From: Date: Sun, 07 Sep 2003 21:30:50 +0000
Subject: note 24332 deleted from function.header by sniper
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-55609@lists.php.net to get a copy of this message
Note Submitter: jpirkey@email.com ---- In attempting to download some rather large c++ source code files (1MB+) with Apache 2.0.39 and PHP 4.2.2 via the following header commands: header("Cache-control: private"); header("Content-Type: text"); header("Content-Length: 1290424"); header("Content-Disposition:attachment; filename=module1.cc.001"); I ran into the issue of the files getting corrupted (i.e. files were scrambled and contained wierd control characters). The files displayed fine if I did not try to download them but let the default content type take effect (text/html). I fixed this by changing the "output_buffering" option in the php.ini to a value larger than my largested source file size 4000000 [~4MB]. The default size in the PHP 4.2.2 php.ini file is 4096 [4KB]. If someone else has any other suggestions concerning this matter, I check this documentation quite often or feel free to email me directly.

« previous php.notes (#55609) next »