Composer self-update killed OpenEMR

I was installing Twig. I noticed that the composer was out of date. So I tried running Composer self-update. Well that did not work. I was getting a similar error to this one with the dompdf

So, I ran this command sudo chown -R $USER ~/.composer.

Apache went down hard after doing that. I tried to undo the comand by running

      sudo chown -R root:root ~/.composer

The did nothing to reverse the issue.

The error message in the error log is

   Uncaught Error: Class 'OpenEMR\\Common\\Logging\\Logger' not found in /var/www/html/t/services/VersionService.php:47

This tells me that namespace or something is not working. I tried to pull up just a plain HTML page and it would not load to the browser (Any Browser)

Have not tried to reinstall apache.

OpenEMR Version
I’m using OpenEMR version 5.0.1(4)

I’m using: All of them

Operating System
I’m using: Ubuntu 18.04

Did you check the logs? Was there anything pertinent in them? Paste them here (surround with three backticks (```) for readability

Uncaught Error: Class 'OpenEMR\\Common\\Logging\\Logger' not found in /var/www/html/t/services/VersionService.php:47

CLI installed worked to fix the problem.

The problem was the composer.phar file got deleted.
Once that was restored. All things came back into being.

I am facing the same issue. Updating composer cli didn’t work for me. Any suggestions ? Please help.

Thanks in advance.
Ankush Kaura

you have followed the solution that was posted?
What directory are you installing composer in? Are you in the ~/directory?
Did you try downloading the composer.phar file?

we are using AWS EB, and I am in the openEMR directory
from where I can download the composer.phar file ?

using .ebextensions/project.config

command: sudo yum -y install php72-ldap
command: export COMPOSER_HOME=/root && /usr/bin/composer.phar self-update



I see you are not using Ubuntu. What OS are you using?

NAME=“Amazon Linux AMI”
ID_LIKE=“rhel fedora”
PRETTY_NAME=“Amazon Linux AMI 2018.03”
HOME_URL=“AWS | Amazon Linux AMI

I am using cent OS RHEL

The solution I posted was for Ubuntu as stated before.
Have you googled composer update centos?

Maybe this will help.