[Solved] Install Issue "The site is currently offline..."

Your software
My Mautic version is: 3.3
My PHP version is: 7.4
My Database type and version is: MySQL 7.4.6

Your problem
My problem is: I got the latest Mautic dump, with dependencies. When I try to run the setup from the browser I get an error message saying “The site is currently offline due to encountering an error. If the problem persists, please contact the system administrator.”

These errors are showing in the log:`

AH01071: Got error ‘PHP message: PHP Warning - mkdir(): Permission denied - in file /var/www/mautic/app/bundles/CoreBundle/Cache/MiddlewareCacheWarmer.php - at line 71PHP message: PHP Warning: mkdir(): Permission denied in /var/www/mautic/app/bundles/CoreBundle/Cache/MiddlewareCacheWarmer.php on line 71PHP message: PHP Warning - file_put_contents(/var/www/mautic/var/cache/prod/middlewares.cache.php): failed to open stream: No such file or directory - in file /var/www/mautic/app/bundles/CoreBundle/Cache/MiddlewareCacheWarmer.php - at line 84PHP message: PHP Warning: file_put_contents(/var/www/mautic/var/cache/prod/middlewares.cache.php): failed to open stream: No such file or directory in /var/www/mautic/app/bundles/CoreBundle/Cache/MiddlewareCacheWarmer.php on line 84PHP message: PHP Warning - include(/var/www/mautic/var/cache/prod/middlewares.cache.php): failed to open stream: No such file or directory - in file /var/www/mautic/app/middlewares/MiddlewareBuilder.php - at line 82PHP message: PHP Warning: include(/var/www/mautic/var/cache/prod/middlewares.cache.php): failed to open stream: No such file or directory in /var/www/mautic/app/middlewares/MiddlewareBuilder.php on line 82PHP message: PHP Warning - include(): Failed opening ‘/var/www/mautic/var/cache/prod/middlewares.cache.php’ for inclusion (include_path=’.:/usr/share/php’) - in file /var/www/mautic/app/middlewares/MiddlewareBuilder.php - at line 82PHP message: PHP Warning: include(): Failed opening ‘/var/www/mautic/var/cache/prod/middlewares.cache.php’ for inclusionPreformatted text (include_path=’.:/usr/share/php’) in /var/www/mautic/app/middlewares/MiddlewareBuilder.php on line 82PHP message: PHP Warning - Invalid argument supplied for foreach() - in file /var/www/mautic/app/middlewares/MiddlewareBuilder.php - at line 84PHP message: PHP Warning: Invalid argument supplied for foreach() in /var/www/mautic/app/middlewares/MiddlewareBuilder.php on line 84’

Steps I have tried to fix the problem:

  1. Checked the minimum requirements and complied.
  2. Community documentation says run

$ chmod -R apache-user:apache-user

on the entire Mautic folder, although it seems unsafe, tried. The problem still exists.
Please advice

Hello,
Any pointers would be useful
Thanks!

I had to give access to apache user, and add some php libraries.

2 Likes

@nick_p can you please share how to give access to apache user and what PHP libraries were added.