Do you use or administer OpenEMR? Take the General Satisfaction Survey to help improve the product

Openemr 6 - Upload Documents not Working

Situation
when I choose a file to upload for a patient, then click Upload, Nothing happens, no error shown , only Blank screen comes
Screenshot attached

OpenEMR Version
I’m using OpenEMR version 6 on Windows --> Just installed

Browser:
I’m using: Google chrome

Operating System
I’m using: Wondows 10

Logs
Did you check the logs? Was there anything pertinent in them? Paste them here (surround with three backticks (```) for readability

How do I check the Logs?

remember everyone you can turn on debug to show errors on screen. just log out/and in after change

makes life easier.
Also saw solution marked for post, is that true and please share if so.

@stephenwaite @brady.miller Can we add this little debugging tid bit to our forum template at the

2 Likes

just edited the template, thanks for the nice idea @sjpadgett

1 Like

After Debugging Log Turned on -->
" Fatal error : Uncaught Error: Call to undefined function mime_content_type() in C:\inetpub\wwwroot\openemr\library\sanitize.inc.php:112 Stack trace: #0 C:\inetpub\wwwroot\openemr\controllers\C_Document.class.php(236): isWhiteFile() #1 C:\inetpub\wwwroot\openemr\library\classes\Controller.class.php(126): C_Document->upload_action_process() #2 C:\inetpub\wwwroot\openemr\controller.php(6): Controller->act() #3 {main} thrown in C:\inetpub\wwwroot\openemr\library\sanitize.inc.php on line 112 "

Please somebody help
Thanks

What type of documents do you have in your allowed list (In the admin settings)… and is the file type you are uploading on that list?

You mean Under Administration-> System -> Files -> White List ?
Attaching Screenshot.

In that white list , .png, .jpeg, .pdf are there and I tried uploading .png and .jpeg and .pdf

Doesn’t make sense! mime_content_type() is a PHP function and valid on all current versions of PHP.
I just tested jpg and png uploads okay.
No idea why you’d get this error!

So What should I do now?

I don’t know. I’m thinking it over…

Oh @pbakshi make sure you have php_fileinfo extension installed and enabled on your o.s!

This use to be enabled by default but I think all the defaults changed around PHP7

1 Like

php_fileinfo is installed and enabled…

Still not able to upload any document.
Following error : -->

"’ Fatal error : Uncaught Error: Call to undefined function mime_content_type() in C:\inetpub\wwwroot\openemr\library\sanitize.inc.php:112 Stack trace: #0 C:\inetpub\wwwroot\openemr\controllers\C_Document.class.php(236): isWhiteFile() #1 C:\inetpub\wwwroot\openemr\library\classes\Controller.class.php(126): C_Document->upload_action_process() #2 C:\inetpub\wwwroot\openemr\controller.php(6): Controller->act() #3 {main} thrown in C:\inetpub\wwwroot\openemr\library\sanitize.inc.php on line 112 "’

Here’s a crazy idea that might help, clone the repo and run the docker-compose up from the openemr/docker/development-easy folder and see if you experience the same issue. If you don’t it might most likely be a permission issue between PHP and windows.

Didn’t understand how to do this