open patient,
go to admin/ practice/ documents, update files….see if that does anything. (dunno if this really works! Looks like it should update the files……)
Look at the patient’s documents, note what is supposed to be there. Look at openemr/sites/default/documents/PID#, see if it is any different. If there is no directory for that PID, or something is funny, you got a problem. Possibly someone has played with those files. You should not (ever) manipulate those files directly.
There are other things to check, but this is a quick easy start.
(1) admin/practice/documents/update files didn’t do anything to change the situation.
(2) Patient’s PID# directory and document files are present at openemr/sites/default/documents.
(3) On further investigation I found that I could only successfully upload new documents for patients entered to the database AFTER upgrading from version 3.2.
(4) For patients entered entered to the database BEFORE upgrading from version 3.2, I can neither upload new documents (no error message - just doesn’t work), nor open documents listed as present, even though they are present at openemr/sites/default/documents/PID#.
(5) In this latter case, the error message is: The requested document is not present at the expected location on the filesystem or there are not sufficient permissions to access it. /var/www/openemr/documents/PID#/document_name.odt
So, it seems that openemr is looking for the documents using the wrong path. How can I correct this?
The path thing has been dealt with (the change in paths to documents from 3.2 to 4.0), so this shouldn’t be causing problems. Is the error showing on the screen or in the php error log? The fact that you can’t upload new docs along with view them makes me think there is a permission issue? What is the operating system that you are using? Do you note any permission differences between the directories of the pre-upgrade patients and post-upgrade patients?
1) The message “The requested document is not present at the expected location on the filesystem or there are not sufficient permissions to access it. /var/www/openemr/documents/PID#/document_name.odt” appears on the screen when I try to upload a document. I understand though that the path should be: openemr/sites/default/documents, not openemr/documents. (??)
2) OS = ubuntu 10.04. (I said 10.10 above, a mistake).
3) Pre-upgrade files’ owner is given as “root”. Post-upgrade files’ owner is given as “www-data”.
This is a permissions error. Make the owner of all of the files in your documents directory to be www-data (this is the apache server, so will give it permission to place new files and view files in all directories).
That does bring up the fact the error message is invalid and misleading, the displayed path is not the one that it was having trouble with, it is the OLD path format…
-Tony
I realize this is an old topic, but i do have the same problem now, all of a sudden. It has worked all the time, but not anymore since recently.
Uploading the files through the website seems to work, the status indicator goes from 1 to 100%, but after that nothing. Checking the dir shows the file isnt there.
Copying the files manually into the patients directory doesnt help either. They will appear in the dir, but not on the website. Old previously uploaded files are still visible though.
what can be the cause of the uploads all of a sudden not working anymore? Maybe a php update on the server?
Suggests to me that either your system is configured to run apache with a different user account than www-data or something got corrupted with the user accounts on your system.
in fact, it has become worse now. since I’ve done what you said I do get these errors when uploading:
Warning: mkdir() [function.mkdir]: Permission denied in /home/clinical/public_html/controllers/C_Document.class.php on line 91
Warning: move_uploaded_file(/home/clinical/public_html/sites/default/documents/40/paspoort.jpg) [function.move-uploaded-file]: failed to open stream: No such file or directory in /home/clinical/public_html/controllers/C_Document.class.php on line 117
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move ‘/tmp/phpWF6jAW’ to ‘/home/clinical/public_html/sites/default/documents/40/paspoort.jpg’ in /home/clinical/public_html/controllers/C_Document.class.php on line 117
It still seems like a problem with permissions, to me, but I’ll defer to someone else with more experience with CentOS, given that I’ve led you astray so far.