Hi, I get the garbage below when I try to open pdf file from patient documents. If i save the file and I give it a pdf extention, I can open it. I upgraded from 3.2 to 4.1.0 (2)? I appreciate your help. thanks.
Brady, the files have the extension pdf already and they were working fine before the upgrade. after the upgrade If I try to open it I get the garbage. in order to see the file content, I have to right click and choose “Save Link As” and what I get is a dialog box that has Save AS: controller.php as the file name and what I do is add .pdf and save the file to the desktop and then go to the desktop and open it. Thanks for your help.
I wonder if the controller.php needs to be changed so that it specifies a mime type (e.g. application/pdf) so that the browser processes it as PDF instead of thinking it’s html.
I tried to look at controller.php…. but it was empty
@yehster what files do you suggest i look at? that would have the mime specifications that affect pdf/tiff/“documents” display/download (stream file types)???
To describe the problem more adequately its like a site where it steams the mp3 in browser but its not necessary plugin related but rather instead of prompting you to download it starts streaming a direct link and i know its not the local firefox settings because it has the same behavior in Internet explorer and chrome… its a mime submission behavior.
Can’t confirm this for new pdf documents on 4.1.0(2) or 4.1.1.
Are you getting this for documents imported after the upgrade or only for documents before the upgrade?
If indeed documents imported after the upgrade are working, while those before the upgrade are not, then will be useful to compare the entries of them in ‘documents’ mysql table to see if any differences (especially the mimetype column).
Even if it’s not working for documents imported after the upgrade also, still curious what is being populated in the mimetype columns.
The system is running the following:
xampp 1.73
php 5.31
mySQL 5.1.41
Pear 1.90
and I running windows 7 home edition
I have upgraded to 4.1.0(2). and the problem is happening with all files that were stored before or after the upgrade. I have looked at the database under documents and the mime type has the different correct extentions as the files were stored, pdf or tif? Do you think any of the above programs needs to be updated? Thank you for your help.
I logged into the Demo to test it out…. It works fine, I dont think it’s pdf specific because it has similar behaviours with other file types such as TIFF and png… I think its a feed/streaming issue with whatever code handles downloading from the server… Because I checked to see if upload works and the files are intact on the server but upon retrieval they show up and are fed incorrectly…
There were errors with this stuff around 3.0-3.2 as I recall, but were fixed by 4.0. So, not obvious why upgrading it would break this. Also, one more thing to do that can sometimes stop weird behavior within the smarty scripts is to remove all files and folders from the following directory:
openemr/interface/main/calendar/modules/PostCalendar/pntemplates/compiled/