Mautic 2.15.3 Installation not working on VPS (PHP 5.6)

Your software
My Mautic version is: 2.15.3
My PHP version is: 5.6

Your problem
My problem is: I am trying to install mautic 2.15.3 on VPS server, on second step of installation process after entering the admin details it is showing following error.

However same environment is working for mautic 2.15.0 version.

Thanks.

These errors are showing in the log:
[2020-01-22 17:01:39] mautic.ERROR: PHP Notice: require(): Failed opening required ‘/var/www/html/app/cache/prod/doctrine/orm/Proxies/__CG__MauticUserBundleEntityRole.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) - in file /var/www/html/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php - at line 209
[2020-01-22 17:01:39] mautic.ERROR: Symfony\Component\Debug\Exception\FatalErrorException: Notice: require(): Failed opening required ‘/var/www/html/app/cache/prod/doctrine/orm/Proxies/__CG__MauticUserBundleEntityRole.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) - in file /var/www/html/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php - at line 209
[2020-01-22 17:01:39] mautic.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalErrorException: “Compile Error: require(): Failed opening required ‘/var/www/html/app/cache/prod/doctrine/orm/Proxies/__CG__MauticUserBundleEntityRole.php’ (include_path=’.:/usr/share/pear:/usr/share/php’)” at /var/www/html/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 ‘/var/www/html/app/cache/prod/doctrine/orm/Proxies/__CG__MauticUserBundleEntityRole.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) at /var/www/html/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php:209)"}

Hi guys, the issue was fixed by setting this for the vps.

php app/console cache:warmup --env=prod

1 Like

Seems like crons are not working and giving following error, after running above command.

require(/var/www/html/app/cache/prod/doctrine/orm/Proxies/__CG__MauticLeadBundleEntityLead.php): failed to open
+stream: No such file or directory in /var/www/html/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php on line 209
PHP Fatal error:  require(): Failed opening required '/var/www/html/app/cache/prod/doctrine/orm/Proxies/__CG__MauticLeadBundleEntityLead.php'
+(include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php on line 209

It very much looks like PHP timed our before finishing creating your cache. Can you increase PHP timeout limit? I experienced systems where it took 2.5 min to warmup the cache.

Also I recommend upgrading PHP to Version 7.2, at least some 7.x (but not yet 7.3) :nerd_face:

Thanks dirk, If i increase the PHP timeout limit, will it also fix the screenshot error as well? i tried this on same VPS with php 7.0 and it was giving same error.

Mautic files/directory (app/cache) must be writable by the web server user.

apache owns all the files and directory of mautic and i have also set the 755 on folders and 644 on files, but still getting the error.

I am curious why everything runs perfectly fine when i install 2.15.0.

Any thoughts on that as well.

Did you run that PHP command (php app/console cache:warmup ) as root user? If you did, the web server user can’t write there as only root has permission to do so.

find -user /var/www/html/app/cache

Yes, i ran above command as root user, i have switched user to apache using following command

su -s /bin/bash apache

Then warmup the cache and crons are running perfectly fine.
Thanks for your help @MxyzptlkFishStix.