# Console not working after converting to Composer on 4.2

**URL:** <https://forum.mautic.org/t/console-not-working-after-converting-to-composer-on-4-2/23430>\
**Category:** Product Support\
**Tags:** mautic-4\
**Created:** [March 31, 2022, 1:25pm UTC](https://forum.mautic.org/t/console-not-working-after-converting-to-composer-on-4-2/23430 "2022-03-31T13:25:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![brightworkcreative](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/brightworkcreative/32/1930_2.png) [@brightworkcreative](https://forum.mautic.org/u/brightworkcreative)\
**Post date:** [March 31, 2022, 1:25pm UTC](https://forum.mautic.org/t/console-not-working-after-converting-to-composer-on-4-2/23430/1 "2022-03-31T13:25:19Z")

</div>

**Your software**  
My Mautic version is: 4.2.0  
My PHP version is: 7.4  
My Database type and version is: 10.3.34-MariaDB

**Your problem**  
My problem is: After following the documentation to convert to Composer, the console/cli/crons are no longer working. Campaign events aren’t triggering, emails aren’t sending, can’t process the 4.2.1 update from the CLI, etc.

**These errors are showing in the log:**  
[31-Mar-2022 13:15:20 UTC] PHP Warning: require\_once(/[PATH-TO-MAUTIC]/bin/…/app/autoload.php): failed to open stream: No such file or directory in /home/proctor360/mautic.proctor360.com/bin/console on line 21  
[31-Mar-2022 13:15:20 UTC] PHP Fatal error: require\_once(): Failed opening required ‘/[PATH-TO-MAUTIC]/bin/…/app/autoload.php’ (include\_path=’.:/opt/cpanel/ea-php74/root/usr/share/pear’) in /home/proctor360/mautic.proctor360.com/bin/console on line 21

**Steps I have tried to fix the problem:**

After converting to composer, I see that there is nothing in the /[PATH-TO-MAUTIC]/app – it’s all in /[PATH-TO-MAUTIC]/docroot/app but console is still in /[PATH-TO-MAUTIC]/bin I’ve only moved the files that the documentation said to move, so I’m hesitant to try moving files around just by guessing.

I’ve run “composer update” but that hasn’t changed anything.

---

<div class="post-metadata">

**Author:** ![brightworkcreative](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/brightworkcreative/32/1930_2.png) [@brightworkcreative](https://forum.mautic.org/u/brightworkcreative)\
**Post date:** [March 31, 2022, 3:31pm UTC](https://forum.mautic.org/t/console-not-working-after-converting-to-composer-on-4-2/23430/2 "2022-03-31T15:31:33Z")

</div>

For anyone else experiencing this issue, it looks like it’s a break that was released in 4.2. The composer conversion does not work as documented. I got some help from Mautic’s slack #composer channel and was directed to this issue on Github which has a temporary fix:

> <https://github.com/mautic/mautic/issues/10957#issuecomment-1083407218>
>
> \### Mautic Version
> 
> 4.2.x series
> 
> \### PHP version
> 
> 7.4
> 
> \### What browsers are yo…u seeing the problem on?
> 
> Not relevant
> 
> \### What happened?
> 
> I updated my mautic to version 4.2, and everything was ok, but i read about install mautic with composer to work well with marketplace, so i did.
> mautic is working, but when trying to use console commands we receive the error in log output
> i think its because the folder structure with composer was change
> 
> for information, the 'app' folder out of 'docroot' is empty, and i don't know if this folder must have some files
> 
> \### How can we reproduce this issue?
> 
> Step 1: Install mautic with composer
> Step 2: run any command with console
> 
> \### Relevant log output
> 
> \`\`\`shell
> PHP Warning: require\_once(/var/www/vhosts/xxxxx/public\_html/mautic/bin/../app/autoload.php): failed to open stream: No such file or directory in /var/www/vhosts/xxxxx/public\_html/mautic/bin/console on line 21
> PHP Fatal error: require\_once(): Failed opening required '/var/www/vhosts/xxxxx/public\_html/mautic/bin/../app/autoload.php' (include\_path='.:/opt/plesk/php/7.4/share/pear') in /var/www/vhosts/xxxxx/public\_html/mautic/bin/console on line 21
> \`\`\`
> 
> 
> \### Code of Conduct
> 
> \- \[X\] I confirm that I have read and agree to follow this project's Code of Conduct

After applying the patch described in the link above, I ran composer update from the mautic root folder and now console is working. **However, if I run composer update again to try to upgrade to 4.2.1, the upgrade does not seem to take place. Still seem to be running 4.2.0**

**So to recap, to temporarily restore console after composer conversion:**

1. Apply the patch
2. Run “composer update” ONCE
3. Don’t run “composer update” again or console will quit working again.
4. Wait for Mautic to release an official fix.
