PDF files view fine. The jpeg files only show a square. I have uploaded new images and the same thing happens as the old images.
I checked that imagemagick is installed. Folder permissions are set to www-data:www-data & 0700.
I matched it against the previous install on the other server.
We are on ubuntu 22.04.1 LTS apache 2.4.52.
I have done more testing. I tried downloading the new image file that was uploaded and when trying to open the file on my local windows machine. I get the error that this file format is not supported. Not only are the old image (jpg) files not showing. But any new files that are uploaded are not displaying either in the browser or after downloading the file from the server.
I took a step back and copied the files from the v5 server to the v7 server in to the ~/migration/documents directory. I downloaded and image jpg from from that location to my local machine as I was able to view the file that was transferred to the v7 server. But when I copied the file to the documents fold then downloaded it again. It was unreadable.
Right now, there seems to be an issue with writing any image file to the documents folder by the program or by the command line.
UPDATE: 12/07/2022
I am still digging and some of this is a configuration issue. There is a common occurance that is happening between our install and the OpenEMR demo. There is a page that pops up that did not in v6.
I am not sure what is forcing this open. It is a new file added by @adunsulag . I will try to digest the page as soon as possible. I think this is a side issue and not directly connected to my original issue.
I have concluded it is a code issue. There has been code modification in the code that is not working properly. This is not a server hardware or OS issue. The issue is in the code of OpenEMR. I am searching for the root cause.
CONCLUSION:
What we ended up doing.
- We never found the root cause of the issue in the code.
- We reapplied all of our changes to the new download of the code.
- Tested and everything worked fine.
This is the command that was used to push the files from old server to the new server.
rsync -razv -e "ssh -i /home/ubuntu/migration/aws_key.pem" /var/www/html/openemr/sites/default/documents ubuntu@5.16.1.23:/home/ubuntu/migration/documents
Once the files were pushed to the new server.
- The documents folder was removed from under the new install.
- Moved the documents folder from the ubuntu/migration folder
- Then copied the keys to the migrated documents folder