Note that there are some explanatory texts on larger screens.

plurals
  1. POIE (HTTPS): generating pdf from php file doesn't work
    primarykey
    data
    text
    <p>Here is my issue. I am trying to call a page: foo.php?docID=bar and return a PDF to the screen which is stored as a BLOB in the DB. </p> <p>Here is the portion of my code which actually returns the PDF:</p> <pre><code>$docID = isset($_REQUEST['docID']) ? $_REQUEST['docID'] : null; if ($docID == null){ die("Document ID was not given."); } $results = getDocumentResults($docID); if (verifyUser($user, $results['ProductId'])){ header('Content-type: application/pdf'); // this is the BLOB data from the results. print $results[1]; } else{ die('You are not allowed to view this document.'); } </code></pre> <p>This works perfectly fine in Firefox. </p> <p>However, in IE, it doesn't show anything at all. If i'm on another page (i.e. google.com), and I type in the URL to go to this page, it will say it's done, but I will still have google.com on my screen.</p> <p>I checked the headers for the responses from both firefox and IE. They are identical.</p> <p>Does anyone have any suggestions? Need more information?</p> <p><strong>EDIT</strong>: If it helps at all, here's the response header and the first line of the content:</p> <pre><code>HTTP/1.1 200 OK Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Content-Length: 349930 Content-Type: application/pdf Expires: Thu, 19 Nov 1981 08:52:00 GMT Server: Microsoft-IIS/6.0 X-Powered-By: PHP/5.1.2 Set-Cookie: PHPSESSID=cql3n3oc13crv3r46h2q04dvq4; path=/; domain=.example.com Content-Disposition: inline; filename='downloadedFile.pdf' X-Powered-By: ASP.NET Date: Tue, 21 Apr 2009 16:35:59 GMT %PDF-1.4 </code></pre> <p><strong>EDIT</strong>: Also, the page which pulls out the pdf file actually uses HTTPS instead of HTTP.</p> <p>Thanks in advance,</p> <p>~Zack</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload