Documents don't upload

Help
2012-02-10
2014-02-12
  • Robert Hale

    Robert Hale - 2012-02-10

    Hi,

    Version 4.1 on ubuntu 10.10 and firefox.

    I have one patient on my database for whom no documents will upload. The same documents will upload successfully for other patients on the database.

    Very odd. I have no idea what to do about it.

    Any help gratefully received.

     
  • Art Eaton

    Art Eaton - 2012-02-10

    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.

     
  • Robert Hale

    Robert Hale - 2012-02-11

    (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?

    Thanks.

     
  • Brady Miller

    Brady Miller - 2012-02-11

    Hi,

    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?

    -brady
    www.open-emr.org

     
  • Robert Hale

    Robert Hale - 2012-02-11

    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".

     
  • Brady Miller

    Brady Miller - 2012-02-11

    Yep,

    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).

    sudo chown -R www-data:www-data /var/www/openemr/sites/default/documents
    

    -brady
    www.open-emr.org

     
  • Robert Hale

    Robert Hale - 2012-02-11

    Yes, that worked. I can now upload and view documents for all patients. Many thanks.

     
  • Tony McCormick

    Tony McCormick - 2012-02-11

    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
    www.mi-squared.com

     
  • Marco Westrik

    Marco Westrik - 2014-02-05

    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?

    we're running OpenEMR version 4.1.0 (7)

     
  • Marco Westrik

    Marco Westrik - 2014-02-05

    some possibly helpful additional information: the server is now running:

    Apache-version 2.2.22
    PHP-version 5.2.17

     
  • Kevin Yeh

    Kevin Yeh - 2014-02-05

    Did you try changing the directory permissions as described in an earlier message in the thread?

     
  • Marco Westrik

    Marco Westrik - 2014-02-05

    when doing it, I only get:

    chown: invalid user: `www-data:www-data'

     
    • Kevin Yeh

      Kevin Yeh - 2014-02-05

      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.

       
  • Marco Westrik

    Marco Westrik - 2014-02-06

    already contacted the host, they couldn't or wouldn't help me with that.

     
  • Marco Westrik

    Marco Westrik - 2014-02-06

    well, I have succeeded in changing the permissions. for the record: www-data is the user on Ubuntu machines. For CentoS machines, that user is apache.

    But still, the problem stays the same.

     
  • Marco Westrik

    Marco Westrik - 2014-02-12

    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

     
  • Kevin Yeh

    Kevin Yeh - 2014-02-12

    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.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks