Hi. I call this script to extract and display pdf files stored as blobs in Oracle 8, using
deliver.php?REPORT_KEY=some_number_here.
<?
header("Content-type: application/pdf"
$db = OCILogon(blahblahblah);
$stmt = OCIParse($db,"select report from reports where report_key=$REPORT_KEY"
OCIExecute($stmt);
OCIFetchInto($stmt,&$arr,OCI_ASSOC);
echo $arr["report"]->load();
?>
It works fine, displaying the pdf in the browser using adobe acrobat reader.
However, I want to add our session vars to this page, and when I put session_start() anywhere in this script, it bombs out (even if I don't register any variables). When I click the link to call the script, it gives me a download dialogue box for some reason, and if I click "save as" I get an error message saying that the server is unavailable. Nothing appears in the error log.
Please save my sanity! Is there a conflict between the content-type and session-handling stuff?
Oddly enough, I got this to work on a different server but same version of RedHat, Apache, and PHP. Hmmmmmm...
Thanks for any help! Brad Gunsalus
Cymtec Systems, Inc.
bgunsalus@cymtec.com
deliver.php?REPORT_KEY=some_number_here.
<?
header("Content-type: application/pdf"
$db = OCILogon(blahblahblah);
$stmt = OCIParse($db,"select report from reports where report_key=$REPORT_KEY"
OCIExecute($stmt);
OCIFetchInto($stmt,&$arr,OCI_ASSOC);
echo $arr["report"]->load();
?>
It works fine, displaying the pdf in the browser using adobe acrobat reader.
However, I want to add our session vars to this page, and when I put session_start() anywhere in this script, it bombs out (even if I don't register any variables). When I click the link to call the script, it gives me a download dialogue box for some reason, and if I click "save as" I get an error message saying that the server is unavailable. Nothing appears in the error log.
Please save my sanity! Is there a conflict between the content-type and session-handling stuff?
Oddly enough, I got this to work on a different server but same version of RedHat, Apache, and PHP. Hmmmmmm...
Thanks for any help! Brad Gunsalus
Cymtec Systems, Inc.
bgunsalus@cymtec.com