Document upload error

Hi - I’m getting the same fatal error. I’ve upgraded to 5.02 patch 5, nothing changed. Tried php 7.3 and 7.4

Tried this fix in php.ini (extension=php_fileinfo.dll) no change.

Any other options to try out there?

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?

This works for me on windows xampp v5.0.2 and PHP 7.4.2

Not that I know off top of my head

I confirmed fileinfo installed.

Seems to load a PDF if I use Chrome instead of FF -
image

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.

Are there file types not permitted?

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 :slight_smile:

yes but was it my patch version or the released patch that did not include several bug fixes not in released patch 5.

Released patch, I’ll install your addendum patch tomorrow and retest …

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)

Thanks, Alan

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.

I’m reluctant to fiddle, appreciate any help :slight_smile:

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…

Good to hear, I will definitely upgrade :slightly_smiling_face:

What PHP version is best for EMR?

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?

Cheers
Alan

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.

Great. Thanks Jerry, support much appreciated.

Hi Jerry, thought I’d wait a couple days and have just installed v6. But somethings wrong …

  1. Is this the login screen - https://emr.clinicalthermography.co.nz/openemr It just looks messy compared to the previous?
  2. When I login, all I get is a blank screen with the circle-shaped logo top left - the only thing I can think of is a must have changed the permissions of openemr/sites/default/ (I’m not experienced with unix) - I did chmod ugo+w to allow me to ftp the sqlconf.php from 5.0.2, and then did chmod ugo-w
    If thats wrong, what chmod should I apply now please?

Thanks, ALan

Hi Jerry, just checking you noticed this? If you’re just busy just let me know :slight_smile:

this is most likely a permission issue on your server. Or windows has the block property set.

I’m on centos 7.9
I agree as per my point 2 above it might be permissions, are you able to tell me what the permissions for openemr/sites/default/ should be please?

directories 2775
files 664

ensure your owner permissions allow read on directory