[Solved]Can't Save Patient Picture

Tags: #<Tag:0x00007fe6dd9ca628> #<Tag:0x00007fe6dd9ca240>

Dear All,

I just managed to install Bahmni 0.79 on a fresh CentOS 6.7. Everything works fine except that I can’t save a patient picture. I use chrome as a browser. I click on the Camera icon, i take the picture , it appears on its assigned place. But when I click the save button or the open visit button the picture I took disappears.

This is weird. I have the same version of Bahmni installed on Digital ocean with no problems with pictures.

I can take a picture with no issues <img src="/uploads/default/original/2X/3/393fc3846f27fd15d40d2a1c6c2168afd1e6fb6b.png"width=“690” height=“366”> the picture is displayed on the patient profile. <img src="/uploads/default/original/2X/0/02870a93aac727fa48d633d2be261add330f055d.png"width=“690” height=“367”> The picture disappears after pressing the save button or the choose visit button

I discovered today That I can’t save any kind of pictures (X-Rays…) Is there something going on with my database ?

Blank picture space after an upload.

Looks like a filesystem permission issue. This is not related to database. Can you check the logs of the apache server.

Check logs in /var/log/httpd/. Look for latest ssl_access and ssl_error files.

Thank you for your response.

Please find attached the files you asked. I have found errors in the error log file :

[Fri Mar 04 09:48:50 2016] [error] [client] (13)Permission denied: access to /patient_images/20e4b122-99e1-43b0-96a5-ed3330836538.jpeg denied, referer:

I tried to run the following commands : chmod 777 /home/bahmni/patient_images

chmod 777 /home/bahmni/patient_images/*

but still no luck.

ssl_access_log.1457102707.txt (1.5 MB)

ssl_error_log.1457102912.txt (80.8 KB)

Try running chmod 755 /home/bahmni/patient_images

Thank you for your answer.

But 777 has higher privileges than 755. I doubt that 755 would work. I will try Monday and let you know. If 755 doesn’t work, what are my other options ?


True, 777 has higher privileges than 755. But, apache requires strict permissions, otherwise it doesn’t work. Try to do chmod 755 on /home/bahmni as well if required.

I tried this command with lo luck :

chmod -R 755 /home/bahmni/patient_images

After that I tried : chmod -R 755 /home/bahmni

Still no luck !!!

the error log shows :

[Mon Mar 07 10:44:52 2016] [error] [client] (13)Permission denied: access to /patient_images/24eca68e-2fd6-485a-a784-0dd1b1b5c917.jpeg denied, referer:
[Mon Mar 07 10:45:02 2016] [error] [client] (13)Permission denied: access to /patient_images/24eca68e-2fd6-485a-a784-0dd1b1b5c917.jpeg denied, referer:
[Mon Mar 07 10:45:43 2016] [error] [client] (13)Permission denied: access to /patient_images/24eca68e-2fd6-485a-a784-0dd1b1b5c917.jpeg denied, referer:

What are my other alternatives ?

Can you try 755 on /home/bahmni also? Set 644 permissions for all files inside /home/bahmni/patient_images Restart httpd (service httpd restart) once (not necessary, just incase).

Reference https://wiki.apache.org/httpd/13PermissionDenied

Thank you.

In the documentation that you sent, I found the linux command setenforce 0 .

That solved my problem !!!

Cool. That’s nice to hear.

Thanks again.

I am using the Vagrant box implementation and experience the same issue with the photo failing to save.

I have tried setenforce 0 followed by Vagrant reload and the problem persists.