After installation: Uh oh! I think I broke it - 500 Internal Server Error

Your software
My Mautic version is: 2.16.0
My PHP version is: 7.0.33

Your problem
My problem is:
After Mautic installation using Softaculous I started to work with Mautic. I configured Email settings (using Amazon SES) and I began to create segments. Then I made a break and when I tried to login as admin a couples of minutes later I received the login error page

"Quote

The site is currently offline due to encountering an error. If the problem persists, please contact the system administrator.

System administrators, check server logs for errors.

Uh oh! I think I broke it. If I do it again, please report me to the system administrator!

500 Internal Server Error

Unquote"

These errors are showing in the log:

[2020-03-22 14:30:05] mautic.WARNING: PHP Warning - require(/home/bestback/public_html/mautic/app/cache/prod/doctrine/orm/Proxies/__CG__MauticCategoryBundleEntityCategory.php): failed to open stream: No such file or directory - in file /home/bestback/public_html/mautic/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php - at line 209 {“className”:“Mautic\CategoryBundle\Entity\Category”,“classMetadata”:“[object] (Doctrine\ORM\Mapping\ClassMetadata: Doctrine\ORM\Mapping\ClassMetadataInfo@000000002f452922000000005b9391a3)”,“proxyClassName”:“Proxies\CG\Mautic\CategoryBundle\Entity\Category”,“fileName”:“/home/bestback/public_html/mautic/app/cache/prod/doctrine/orm/Proxies/__CG__MauticCategoryBundleEntityCategory.php”}

[2020-03-22 14:30:05] mautic.WARNING: PHP Warning - require(/home/bestback/public_html/mautic/app/cache/prod/doctrine/orm/Proxies/__CG__MauticCategoryBundleEntityCategory.php): failed to open stream: No such file or directory - in file /home/bestback/public_html/mautic/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php - at line 209 {“className”:“Mautic\CategoryBundle\Entity\Category”,“classMetadata”:“[object] (Doctrine\ORM\Mapping\ClassMetadata: Doctrine\ORM\Mapping\ClassMetadataInfo@000000002f452922000000005b9391a3)”,“proxyClassName”:“Proxies\CG\Mautic\CategoryBundle\Entity\Category”,“fileName”:“/home/bestback/public_html/mautic/app/cache/prod/doctrine/orm/Proxies/__CG__MauticCategoryBundleEntityCategory.php”}

[2020-03-22 14:30:05] mautic.ERROR: PHP Notice: require(): Failed opening required ‘/home/bestback/public_html/mautic/app/cache/prod/doctrine/orm/Proxies/__CG__MauticCategoryBundleEntityCategory.php’ (include_path=‘.:/opt/cpanel/ea-php70/root/usr/share/pear’) - in file /home/bestback/public_html/mautic/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php - at line 209

[[2020-03-22 14:30:05] mautic.ERROR: Symfony\Component\Debug\Exception\FatalErrorException: Notice: require(): Failed opening required ‘/home/bestback/public_html/mautic/app/cache/prod/doctrine/orm/Proxies/__CG__MauticCategoryBundleEntityCategory.php’ (include_path=‘.:/opt/cpanel/ea-php70/root/usr/share/pear’) - in file /home/bestback/public_html/mautic/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php - at line 209

[2020-03-22 14:30:05] mautic.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalErrorException: “Compile Error: require(): Failed opening required ‘/home/bestback/public_html/mautic/app/cache/prod/doctrine/orm/Proxies/__CG__MauticCategoryBundleEntityCategory.php’ (include_path=‘.:/opt/cpanel/ea-php70/root/usr/share/pear’)” at /home/bestback/public_html/mautic/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php line 209 {“exception”:“[object] (Symfony\Component\Debug\Exception\FatalErrorException(code: 0): Compile Error: require(): Failed opening required ‘/home/bestback/public_html/mautic/app/cache/prod/doctrine/orm/Proxies/__CG__MauticCategoryBundleEntityCategory.php’ (include_path=‘.:/opt/cpanel/ea-php70/root/usr/share/pear’) at /home/bestback/public_html/mautic/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php:209)”}

Steps I have tried to fix the problem:

I read several of the support post in this forum about that error. I cleared the app/cache as recommended without any positive result.

The installation is on a shared web hosting account. Unfortunately (regarding this problem), I am not very familiar with PHP commands of how to run these on a shared hosting account.

Do I have to create a new repair.php file and save it in the Mautic directory and run it in order for the included PHP commands to execute???

I believe that Mautic is a really great application and I want to use it. I hope that I can get the help that I need to fix that problem

Thank you so much!

Yeah me too thats why am sticking around
Try create a sub domain and re do installation again use softaculous so you dont have to worry about any details being correct or not.
If it works remove previous installation where you want it and re install using softaculous

Thanks for your tip

I tried it and it did fail too! Login was not even possible - error page showed right away.

That could be a problem with your hosting provider and database issues
I have been carrying out test with mautic since 2 weeks ago
with over 15 installation and none has failed if used softaculous.

I only changed hosting when page hit wasnt working then later knew its mautic issue not hosting.

Get a cheap hosting for test like $5 or so am sure it will work then you can get your hosting to fix their issues

Thanks for your reply.

Could you please tell me which issues my web hosting service has to fix? I am a novice in these matters?

I have also installed Mautic using Softaculous on my shared hosting without any issues.

Did you install it on a subdomain? Which hosting are you using?

Feel free to PM me.

Thanks for your reply!

I did both install it on a sub-domain and in a directory. The current installation is in a directory

I have an account with an UK firm named Brixly

Hi there,

This is almost always a file/folder ownership/permissions issue.

As this is coming up with increasing frequency in the forums I’ve written up an article for the docs which you can find here:

Hope this helps!

2 Likes

Hi,

After I tried to execute/run all recommended CLI commands Mautic still showed the same error page and the same error messages in the error logs

Nevertheless, Mautic is such a great app that I really want to work with it - I think it is one of the best apps for customer relations and email automation.

I am a very satisfied customer of Brixly, a UK web hosting company. I thought that it would be a good idea to ask their customer support for help. I told them what I did and what error messages I got and I informed them about rcheesley’s recommendations.

After some minutes MAUTIC was working (and since then) and I asked what Brixly support did to get Mautic running.

This is their answer and I hope that this will help a lot of shared hosting customers around the world who want to run Mautic and face the same problems as I did:

Quote

Hey Tony,

We run a bash script from here, which sets permissions to ‘default’ or recommended values. We tend to use the following…

GitHub - PeachFlame/cPanel-fixperms: A script to fix permissions & ownership, on files & directories, for cPanel accounts.

This would need to be run from our end, but only corrects any permissions back to what they would be / should be when the account is created.

Pleasure, glad it’s working fine which is the main thing :slight_smile: keep safe!

Kind Regards,

Dennis Nind
Snr. Technical Analyst / CEO
cPanel Professional Certified (CPP, CWA)
Brixly Web Solutions (https://brixly.uk)

Unquote

I hope this helps you as it did me

Best,
Tony

I still looks to me like an incomplete cache. This happens when the PHP Timeout is set too low. I need to increase them to 300 seconds when upgrading installations to refresh cache completely. Can you increase PHP Timeout, clear cache and try again?

Hi Dirk,

I did increase the time out to 360 and faced the same problems still and Mautic did not run. Then I asked my webhosting support and they fixed the problem in resetting the permissions with a cPanel bash script which is described here

Now Mautic is running like a charm.

Perhaps, that solution could help a lot of Mautic users who face the same problems as I did.

Again, thanks for your message!

Best,
Tony

1 Like