Re: Problems downloading a PDF

From: Date: Wed, 04 Apr 2007 13:04:55 +0000
Subject: Re: Problems downloading a PDF
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-252033@lists.php.net to get a copy of this message
Hi, Ok, i've hardcoded the filename and i no longer get a 404 error. But the "PDF" file i get is this: "Warning: Cannot modify header information - headers already sent by (output started at /var/www/telbit_website/2/products-testudio.php:14) in /var/www/telbit_website/2/products-testudio.php on line 120 Warning: Cannot modify header information - headers already sent by (output started at /var/www/telbit_website/2/products-testudio.php:14) in /var/www/telbit_website/2/products-testudio.php on line 121 Warning: Cannot modify header information - headers already sent by (output started at /var/www/telbit_website/2/products-testudio.php:14) in /var/www/telbit_website/2/products-testudio.php on line 122 %PDF-1.4 %âãÏÓ 351 0 obj <> endobj xref 351 434 0000000016 00000 n 0000010281 00000 n 0000010417 00000 n 0000010574 00000 n 0000010607 00000 n 0000012850 00000 n 0000012884 00000 n 0000013037 00000 n 0000013174 00000 n 0000013704 00000 n 0000014104 00000 n 0000014488 00000 n 0000014700 00000 n 0000014747 00000 n 0000014794 00000 n 0000014842 00000 n 0000014889 00000 n 0000014937 00000 n 0000014984 00000 n 0000015033 00000 n 0000015082 00000 n 0000015130 00000 n 0000015179 00000 n 0000015228 00000 n 0000015277 00000 n 0000015326" (etc...)
You are echoing stuff before sending the file that is not possible. So remove the echo and it should work. If not, try this for debugging: if(!is_readable($full)) echo "the file $full is not readable by apache"; else { //same as before } I'm not sure if i understand you :(
Warm Regards -- :wq! Mário Gamito

« previous php.general (#252033) next »