Mário Gamito wrote:
I don't get the warnings anymore, but the PDF is still being displayed
with its binary code inside in the PHP page:
Are you opening the file as a binary file?
Cheers,
Rich
--
Zend Certified Engineer
http://www.corephp.co.uk
"Never trust a computer you can't throw out of
Jochem Maas wrote:
fine. so exactly what is the 100% bullitproof validation that will catch
every attack attempt? other than basename()ing the input and suffixing it
to the relevant path and then checking that to see if the file exists??
It depends how you want to handle invalid data. If you'r
Mário Gamito wrote:
> Ok,
>
> I don't get the warnings anymore, but the PDF is still being displayed
> with its binary code inside in the PHP page:
>
> "%PDF-1.4 %âãÏÓ 351 0 obj <> endobj xref 351 434 16 0 n
> 010281 0 n 010417 0 n 010574 0 n 010607
> 0
Mário Gamito wrote:
> Hi,
>
>> by reading the freaking replies that you get?!? :-), I did give you
>> the answer to this in the rewritten code I offered. (granted
> You the code you gave me i get
I didn't write 120+ liones of code - so what your running is definitely
not what I gave you. ..
>
Ok,
I don't get the warnings anymore, but the PDF is still being displayed
with its binary code inside in the PHP page:
"%PDF-1.4 %âãÏÓ 351 0 obj <> endobj xref 351 434 16 0 n
010281 0 n 010417 0 n 010574 0 n 010607
0 n 012850 0 n 01288
Hi,
by reading the freaking replies that you get?!? :-), I did give you
the answer to this in the rewritten code I offered. (granted
You the code you gave me i get
"Warning: Cannot modify header information - headers already sent by
(output started at /var/www/telbit_website/2/products-testud
2007. 04. 4, szerda keltezéssel 14.23-kor Mário Gamito ezt írta:
> Hi,
>
> > that's what I said before. you echo out some html before the file
> > headers. that will never work.
> > remove the echo statement on line 14 and you should be okay
> But i need the line
>
> echo " " rel=\"ex
Mário Gamito wrote:
> Hi,
>
>> that's what I said before. you echo out some html before the file
>> headers. that will never work.
>> remove the echo statement on line 14 and you should be okay
> But i need the line
>
> echo "" rel=\"external\">Download TESTUDIO flyer";
>
> to displa
Richard Davey wrote:
> Jochem Maas wrote:
>
>>> You don't need to basename() it, you already know what the filename is,
>>> because it was requested via $_GET['file'].
>>
>> I would say almost the opposite:
>
> Let me rephrase: if you are properly validating the $_GET['file'] input
> anyway, base
Hi,
that's what I said before. you echo out some html before the file
headers. that will never work.
remove the echo statement on line 14 and you should be okay
But i need the line
echo " " rel=\"external\">Download TESTUDIO flyer";
to display the link for download!!!
How can i so
2007. 04. 4, szerda keltezéssel 14.04-kor Mário Gamito ezt írta:
> 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/
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
Hi,
Thank you all for your answers.
I would say almost the opposite:
I get a Page Not found.
The problem is that $file variable is empty (tested with a print).
Any ideas ?
Warm Regards
--
:wq! Mário Gamito
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.p
Jochem Maas wrote:
You don't need to basename() it, you already know what the filename is,
because it was requested via $_GET['file'].
I would say almost the opposite:
Let me rephrase: if you are properly validating the $_GET['file'] input
anyway, basenaming it is a superfluous step that ma
Richard Davey wrote:
> Mário Gamito wrote:
>
>> To prevent people to insert the full URL to the documents, i moved
>> them outside Apache's DocumentRooot, which is /var/www.
>>
>> My site is in /var/www/telbit and i put the PDFs in /var/www
>>
>> I've coded in order to do the trick, but it's faili
Mário Gamito wrote:
To prevent people to insert the full URL to the documents, i moved them
outside Apache's DocumentRooot, which is /var/www.
My site is in /var/www/telbit and i put the PDFs in /var/www
I've coded in order to do the trick, but it's failing.
I can't get the name of the file.
2007. 04. 4, szerda keltezéssel 12.46-kor Mário Gamito ezt írta:
> Hi,
>
> I'm building this site that has several PDFs to download, but only to
> registered users.
>
> To prevent people to insert the full URL to the documents, i moved them
> outside Apache's DocumentRooot, which is /var/www.
>
> -Original Message-
> From: Mário Gamito [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, April 04, 2007 1:46 PM
> To: php-general@lists.php.net
> Subject: [PHP] Problems downloading a PDF
>
> Hi,
>
> I'm building this site that has several PDFs to download
Hi,
I'm building this site that has several PDFs to download, but only to
registered users.
To prevent people to insert the full URL to the documents, i moved them
outside Apache's DocumentRooot, which is /var/www.
My site is in /var/www/telbit and i put the PDFs in /var/www
I've coded in
19 matches
Mail list logo