Templates for Patient Documents: Site ID is missing from session data!

(Rick) #61

Because the code was already in the download_template.php document, I deleted the ob_clean and flush code. Result: fetching the documents via patient=>documents works partly. Opening the document in Word and letting Word reparing the document gives the result … strange!!

(Jerry P) #62

try this
download_template.php (14.1 KB)

(Rick) #63

That did the trick, fetching the document and open in openoffice works!!

What was the issue?

You added
error_reporting(error_reporting() & ~E_NOTICE);
ini_set(‘display_errors’, 1);

AND deleted: Flush


(Jerry P) #64

This was debug stuff and multibyte may be issue but doubt it. I did add character set to header content type: header(“Content-Type: $mimetype; charset=utf-8”); and set cache control to private:
header(“Cache-control: private”); Also, ended the output buffer instead of
So here is a source for release. Took out debugging and multibyte. If this file works then your good to go.

download_template.php (14.0 KB)

(Rick) #65

I implemented download_template.php and it works!!!

Thank you very much for all your work and patience.
What do I owe you?

(Brady Miller) #66

hi @sjpadgett and @Ralf_Lukner , The session/cookie fix will be in the first 5.0.2 patch (guessing it will go out in a couple weeks). Here is the fix if you need it earlier: cookie/session fix and a path fix (#2615) · openemr/openemr@22f3c7c · GitHub
(just the code in the login.php script)

(Jerry P) #67

You owe me nothing. I know how hard these types of issues can be for folks. In this case we had a perfect storm of symptoms.

Now, if you wanted to make a small donation to OpenEMR to help defray the cost of this forum then, who am I to tell you how to spend your money. :slight_smile:

Until next time.

(Rick) #68

I will do, thanks …

(Jerry P) #69

Thanks. I’ve already have on my server. Seems to be working back to way it use to work. Still testing though.