Google Answers Logo
View Question
 
Q: PHP coding ( No Answer,   0 Comments )
Question  
Subject: PHP coding
Category: Computers > Programming
Asked by: stever-ga
List Price: $10.00
Posted: 19 Dec 2002 12:09 PST
Expires: 19 Dec 2002 21:08 PST
Question ID: 126994
This question is a continuation of a previous question I asked, found
at https://answers.google.com/answers/main?cmd=threadview&id=123489. 
I was looking for a way to display PDF files in a browser window while
storing the PDF files outside the webserver's document root directory,
and the PHP code seen in the question's answer works.  The code looks
like this:

<?php
$file = "/var/docs/pdftest.pdf";
$filename = "pdftest.pdf";

header("Cache-control: private");
header("Content-Type: application/$ext");
header("Content-Length: ".filesize($file));
header("Content-Disposition: inline; filename=$filename");

readfile($file);
?>

Now my question is this: I've enabled SSL on my Apache webserver,
which works fine, but when I request a PDF download I get a warning
that the file I've requested contains insecure items.  I think it must
be a problem with the headers I'm sending, because if I move the file
into the document root and request it directly it works fine --
Acrobat Reader opens in the browser window and no SSL warnings appear.

So, to sum up: how do I need to modify the PHP code above to make it
SSL-safe?
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy