Situation
When trying to upload document or id image (.jpg), this error occurs: Fatal error : Uncaught Error: Call to undefined function mime_content_type() in /home/ccfsecur/public_html/eedenglen/openemr/library/sanitize.inc.php:105 Stack trace: #0 /home/ccfsecur/public_html/eedenglen/openemr/controllers/C_Document.class.php(156): isWhiteFile(’/tmp/phpwBK1hK’) #1 /home/ccfsecur/public_html/eedenglen/openemr/library/classes/Controller.class.php(128): C_Document->upload_action_process(‘43’, ‘5’) #2 /home/ccfsecur/public_html/eedenglen/openemr/controller.php(5): Controller->act(Array) #3 {main} thrown in /home/ccfsecur/public_html/eedenglen/openemr/library/sanitize.inc.php on line 105 OpenEMR Version
I’m using OpenEMR version 5.0.2
Browser:
I’m using: Mozilla Firefox
Operating System
I’m using: Linux
Logs
Did you check the logs? Was there anything pertinent in them? Nothing pertinent
Version 5.0.2(any) is released on PHP7.2 though doubtful this is the issue but keep in mind.
Perhaps you don’t have the fileinfo extension installed and/or enabled on your server. Do a web search on how to check or do.
I see you have the ini extension set but on windows not the most reliable as ensure you restarted server and/or check your phpinfo to see that the extension is trying enabled.
Good point though I thought, so switched to 7.2 - thats made a difference, no more fatal errors, but new errors - including 1 saying the file was 0 size (it wasn’t), error 4 for a .docx file, and " The system does not permit uploading files with MIME content type - application/vnd.openxmlformats-officedocument.wordprocessingml.document."
I’m going to check fileinfo is installed, but inb the meantime - is there a thorough spec for how to have a reliable setup for loading docs?
Seems to load a PDF if I use Chrome instead of FF -
but then when I come back to it, I can’t see the file.
AM I doing something wrong?
select patient, click ‘documents’, click ‘patient information’
Is there something else I need to do to see previously uploaded files?
docx files always get this error -
The system does not permit uploading files with MIME content type - application/vnd.openxmlformats-officedocument.wordprocessingml.document.
I showed I can upload above and am also on PHP7.4.
For xml doc types(docx and doc) you may upload to store but can’t open in the view panel. Instead, should open a download dialog.
I don’t to leave you hanging but I can’t think of why you have this issue right now but, know it works and i’ll have to think it over.
Suggest you be on my patch 5 if not already.
Hi Jerry, had just installed patch 5 hoping it would fix this.
fileinfo wasn’t installed for 7.4 - which is why I got different result when I tried 7.2, now installed for 7.4 and giving same result as 7.2 … suggests not a php issue?
This is still in test so not urgent, I appreciate your efforts so far, will put on pause for a bit
Hi - I got pulled away, just installed your patch now and I’m seeing some errors - see attached doc. The patient finder is stuck on the rotating red circle.
I suspect this may be an indication that something is not right with my installation, although I have been careful with the original install, patches etc. Is there any way of validating my setup? Are there any PHP etc. settings I should check?
I’m on php 7.4, fileinfo enabled, php-fpm enabled,
MySql: * Server version: 5.7.32 - MySQL Community Server (GPL)
Hi again, I’m just wondering where to from here …
1). I found a way around the normal patient finder tab being stuck (new/search from the top menu drop-downs) - and I loaded a PDF with no hassles, and can access the doc later - so that seems fixed.
2). The depreciated warnings:
I am reluctant to hide them, I think they indicate something wrong with my setup, they all seem to refer to ‘new_comprehensive.php’ - here is an example: Deprecated : Array and string offset access syntax with curly braces is deprecated in /home/emr502/public_html/openemr/interface/new/new_comprehensive.php on line 789
3). So the main issue now is the error when the Patient Finder tab loads, I get an alert:-
TypeError: msg.toLowerCase is not a function
URL: https://emr.clinicalthermography.co.nz/openemr/library/js/userDebug.js?v=51
Line: 44 Column: 26
Error object: “{}”
There are also a few depreciated messages, all refer to patient.inc e.g. Deprecated : Array and string offset access syntax with curly braces is deprecated in /home/emr502/public_html/openemr/library/patient.inc on line 882
After I click ‘OK’ in the alert box, I get a rotating pair of red arrows, and the screen stops loading - no details.
Hi Alan,
v5.0.2 has issues on PHP 7.4. If need to turn off deprecated errors. They can cause you problems. v6.0 will be released in a couple days. Why not upgrade…
The thing I worry about a little, is that I have done some extensive work with patient demographics (though always using the EMR demographic editor) - and that does affect the patient_data record structure … any thoughts on that?
If using layouts editor then no worries with upgrade. If you have custom code for a report etc well then you’ll need to refactor to new version.
For PHP, Brady worked hard to be PHP8 compatible for v6 however, v6 runs fine on PHP7.4 which is where i’d stay till PHP8 matures awhile.