Issues with Documents after migrating to Ubuntu from Windows

We’re having some issues with some documents not displaying after we migrated from Windows to a Ubuntu installation.

I noticed in the MySQL database, there’s a “documents” table and it looks like the missing documents might have the wrong “file_url” (C:/xampp/htdocs/openemr/sites/default/documents/5009/some file.1.pdf) other documents are working and Im guessing it’s because they have the new path to the documents (file:///media/ebs_volume/openemr/sites/default/documents/5233/pt_info). Is there an easy way to update this?

We’re running v4.1.2 on Ubuntu 14.04

Thanks!

hi @henryjustinserrano, think the simplest way would be a custom php script that loops through the documents table and updates the url by replacing the old fixed part of the filename with the new part

Thanks for the reply Stephen. Ok I’ll work on updating the url. That’s the only place (documents table) that it will need to be updated, correct?

afaik

hmm, I tried updating just one url for one of the documents as a test and it still didn’t work. Can you think of anything else I can try?

Im seeing errors like the following in the Apache error log:

[Tue Mar 13 21:54:02.670662 2018] [:error] [pid 18717] [client 172.31.32.206:12616] PHP Notice: Undefined property: CategoryTree::$root_type in /media/ebs_volume/openemr/library/classes/Tree.class.php on line 54, referer: http://127.0.0.1:8080/controller.php?document&view&patient_id=5009&doc_id=69537&

Thanks!

Hi @henryjustinserrano ,

No changes should be needed in the paths (OpenEMR only uses the right part of the path and ignores the rest, which allows migration to different paths without issues). Are all docs not working or specific types of docs?

-brady

don’t think that php Notice is the problem, in the document table records there’s a path_depth field that will strip out any of the other pathname, think it defaults to 1, so in your case is pt_info a directory?