Hello. Files over 10 MB are not loading into the documents section of medical record. NO error message is returned, and after spending about 20 seconds watching the green bar start to go across the bottom of the browser window( /controller.php listed as the working process), it just stops and returns to same upload screen where it was previously.
NOTE: All files less than about 10MB work perfectly.
I have checked the following trying to find the source of the problem.
php.ini located in c:\xampp\php\
Here is the section on file uploads:
;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;
; Whether to allow HTTP file uploads.
file_uploads = On
; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
upload_tmp_dir = “\xampp\tmp”
; Maximum allowed size for uploaded files.
upload_max_filesize = 64M
max_execution_time = 60 ; Maximum execution time of each script, in seconds
max_input_time = 90 ; Maximum amount of time each script may spend parsing request data
memory_limit = 128M ; Maximum amount of memory a script may consume (16MB)
I am stumped!!!
Please help us with this great program you have wrote, we are grateful!!!
Thank you,
Martin
Okay, I’m replying to my own post - in hope that maybe “penguin8r” might read this and be able to help me.
I noticed that in OpenEMR patch 3.2.0 there is a line that says:
Increased document upload size limit to 64MB (thank you penguin8r)
I am currently running version 3.2.0 with a clean install.
Thank you,
Tom
Hello again.
I am adding more information to my previous post - we found the php.ini file stuff earlier - and now I just found this in:
C:\xampp\htdocs\openemr\templates\documents
and in:
C:\xampp\htdocs\openemr\templates\document-categories
in the document-categories folder there is a file called “general_upload.html”
that has the following code:
<body bgcolor="{$STYLE.BGCOLOR2}">
<form method=post enctype=“multipart/form-data” action="{$FORM_ACTION}" onsubmit=“return top.restoreSession()”>
<input type=“hidden” name=“MAX_FILE_SIZE” value=“12000000” />
<table>
the file in the “documents” folder has this similar code:
<form method=post enctype=“multipart/form-data” action="{$FORM_ACTION}" onsubmit=“return top.restoreSession()”>
<input type=“hidden” name=“MAX_FILE_SIZE” value=“12000000” />
<table>
So, it would seem that this may be the root of the problem???
A quick caculation would indicate that that value, if in bytes, equals: 11.444091796875 megabytes
Can someone coment if it is acceptable to simply increase this value to the desired amount, say maybe 64 megabytes?
Will this break anything else in OpenEMR?
THANK YOU!
Martin
This seems really really sloppy. So to increase the size of a file upload allowed by the system you have to edit the php.ini AND edit the source code directly. Can this hidden field be dropped so that the configuration in the php.ini can be the canonical way to set the max file upload size?
This just seems horribly cumbersome and it’s obviously not intuitive (see above posts).
I think the patch has been implemented already in the source code for version 4.0?
don’t remember running into this limit since we started implementing 4.0-dev.
Brady, correct me if I’m wrong on this…?
Even if the aforementioned patch has been applied that just means when you get to 64Meg files it will happen again. When the next person comes along to fix that they will run into the same issue and a similar patch will be applied to up it again, perhaps to 128M, etc. PHP already has a built-in mechanism for this that is well understood.
Let me rephrase my statements above as a question:
Is there a reason that there is a hidden input field in the upload form to limit the upload size? Does it serve a purpose other than to provide a hard limit on upload sizes?
Not to add to the confusion - but in the documentation - shouldn’t is say 61 Megabytes?
That is, if the 64000000 mentioned in that HTML code is refering to bytes (and i’m not 100% sure that it is)
then……
I checked again and the guy said something about recursive … I don’t remember but he changed something and now is working fine. thanks a lot!!! - SOLVED