# LAMP fails to start installer proces

**URL:** <https://forum.mautic.org/t/lamp-fails-to-start-installer-proces/32267>\
**Category:** Mautic 5 Install/Upgrade Support\
**Created:** [June 4, 2024, 10:10pm UTC](https://forum.mautic.org/t/lamp-fails-to-start-installer-proces/32267 "2024-06-04T22:10:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![guidedfree](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/guidedfree/32/12725_2.png) [@guidedfree](https://forum.mautic.org/u/guidedfree)\
**Post date:** [June 4, 2024, 10:10pm UTC](https://forum.mautic.org/t/lamp-fails-to-start-installer-proces/32267/1 "2024-06-04T22:10:14Z")

</div>

**Your software**  
My Mautic version is: 5.0.4  
My PHP version is: 8.1.2-1ubuntu2.17  
My Database type and version is: MySQL 8.0.36  
OS: Ubuntu 22.04  
WebServer: Apache/2.4.52

**Your problem**  
My problem is: Upon attempting to install, I get the following message: “The site is currently offline due to encountering an error. If the problem persists, please contact the system administrator.”

Steps taken to install:  
Attempting to install for first time. I downloaded the zip file directly from [Download - Mautic Community](https://www.mautic.org/download), moved the zip file to my web directory: /var/www/html/maut/  
Extracted using unzip and accessed the website: 127.0.0.1/maut/  
modified apache2.conf for the ‘AllowOverride All’ issue.

These errors are showing in the log:  
No logs are being generated in the mautic/var/log directory.  
Apache error logs show:

```auto
dilbert@tww:/var/www/html/maut$ tail -f /var/log/apache2/error.log
[Tue Jun 04 15:52:58.421009 2024] [php:notice] [pid 1982011] [client 127.0.0.1:54816] PHP Warning - include(/var/www/html/maut/var/cache/prod/middlewares.cache.php): Failed to open stream: No such file or directory - in file /var/www/html/maut/app/middlewares/MiddlewareBuilder.php - at line 66
[Tue Jun 04 15:52:58.421018 2024] [php:warn] [pid 1982011] [client 127.0.0.1:54816] PHP Warning: include(/var/www/html/maut/var/cache/prod/middlewares.cache.php): Failed to open stream: No such file or directory in /var/www/html/maut/app/middlewares/MiddlewareBuilder.php on line 66
[Tue Jun 04 15:52:58.421022 2024] [php:notice] [pid 1982011] [client 127.0.0.1:54816] PHP Warning - include(): Failed opening '/var/www/html/maut/var/cache/prod/middlewares.cache.php' for inclusion (include_path='.:/usr/share/php') - in file /var/www/html/maut/app/middlewares/MiddlewareBuilder.php - at line 66
[Tue Jun 04 15:52:58.421024 2024] [php:warn] [pid 1982011] [client 127.0.0.1:54816] PHP Warning: include(): Failed opening '/var/www/html/maut/var/cache/prod/middlewares.cache.php' for inclusion (include_path='.:/usr/share/php') in /var/www/html/maut/app/middlewares/MiddlewareBuilder.php on line 66
[Tue Jun 04 15:52:58.421027 2024] [php:notice] [pid 1982011] [client 127.0.0.1:54816] PHP Warning - foreach() argument must be of type array|object, bool given - in file /var/www/html/maut/app/middlewares/MiddlewareBuilder.php - at line 68
[Tue Jun 04 15:52:58.421029 2024] [php:warn] [pid 1982011] [client 127.0.0.1:54816] PHP Warning: foreach() argument must be of type array|object, bool given in /var/www/html/maut/app/middlewares/MiddlewareBuilder.php on line 68
[Tue Jun 04 15:52:58.446250 2024] [php:notice] [pid 1982011] [client 127.0.0.1:54816] RuntimeException: Unable to create the "cache" directory (/var/www/html/maut/var/cache/prod). - in file /var/www/html/maut/vendor/symfony/http-kernel/Kernel.php - at line 638
[Tue Jun 04 15:54:08.150189 2024] [php:notice] [pid 1982017] [client 127.0.0.1:47950] LogicException: Extension DOM is required. - in file /var/www/html/maut/vendor/symfony/config/Util/XmlUtils.php - at line 50

```

Steps I have tried to fix the problem:  
Reviewed the file: MiddlewareBuilder.php  
lines 20-25:

```auto
    public function __construct(\AppKernel $app)
    {
        $this->app = $app;
        $this->cacheFile = sprintf('%s/middlewares.cache.php', $app->getCacheDir());
        $this->specs = new \SplPriorityQueue();
    }

```

Line 63 - 71:

```auto
    private function loadCacheFile(): void
    {
        /** @var array $middlewares */
        $middlewares = include $this->cacheFile;

        foreach ($middlewares as $middleware) {
            $this->push($middleware);
        }
    }

```

contents of middlewares.cache.php

```auto
<?php return array (
  0 => 'Mautic\\Middleware\\CORSMiddleware',
  1 => 'Mautic\\Middleware\\HSTSMiddleware',
  2 => 'Mautic\\Middleware\\CatchExceptionMiddleware',
  3 => 'Mautic\\Middleware\\VersionCheckMiddleware',
  4 => 'Mautic\\Middleware\\TrustMiddleware',
);

```

I then followed the steps in this tutorial to see if I missed something:

> **[Mautic 5 Installation Tutorial: Ubuntu 22.04, PHP 8.1, MariaDB 11](https://mauteam.org/mautic/install-mautic/mautic-5-installation-on-ubuntu-22-04-with-php-8-1-and-mariadb-11/)**
>
> Simplest setup guide to install Mautic 5 on Ubuntu 22.04 with PHP 8.1 and MariaDB 10.6 (MySQL 8.0). Mautic 5 install tutorial on your own VPS or server.

but still get the same results.  
I also downloaded the file twice to see if it was a corruption issue. MD5’s where the same: 809416a6201488e33f1b99173432997c 92 mautic-504.zip

---

<div class="post-metadata">

**Author:** ![steveb85as](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@steveb85as](https://forum.mautic.org/u/steveb85as)\
**Post date:** [June 13, 2024, 2:29am UTC](https://forum.mautic.org/t/lamp-fails-to-start-installer-proces/32267/2 "2024-06-13T02:29:17Z")

</div>

I feel this is related to my issue here potentially

> [@New Install - Database incomplete & can't migrate](https://forum.mautic.org/t/new-install-database-incomplete-cant-migrate/32330):
>
> Your software My Mautic version is:5.0.4 My PHP version is:8.1 My Database type and version is: tried BOTH mysql 8.1 and 5.7 Your problem My problem is: Fresh install, the install works great, (installing on docker) as soon as I do thorough testing, which requires a reboot of the mautic container, there is a database connection issue, logs show missing tables, and columns, a list of available migrations shows a long list, but any attempt to migrate results in failures in all directions, t…

I was getting the same message, but i was tracing to imcomplete database schema but perhaps i was wrong in my tracing… curious if you found any outcomes or results?

---

<div class="post-metadata">

**Author:** ![steveb85as](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@steveb85as](https://forum.mautic.org/u/steveb85as)\
**Post date:** [June 13, 2024, 8:47pm UTC](https://forum.mautic.org/t/lamp-fails-to-start-installer-proces/32267/3 "2024-06-13T20:47:11Z")

</div>

what seemed to work for me – is on reboot i need to run these

php /var/www/html/bin/console doctrine:cache:clear-metadata

php /var/www/html/bin/console doctrine:cache:clear-query

php /var/www/html/bin/console doctrine:cache:clear-result

and then it seems to work

---

<div class="post-metadata">

**Author:** ![guidedfree](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/guidedfree/32/12725_2.png) [@guidedfree](https://forum.mautic.org/u/guidedfree)\
**Post date:** [June 15, 2024, 8:55pm UTC](https://forum.mautic.org/t/lamp-fails-to-start-installer-proces/32267/4 "2024-06-15T20:55:55Z")

</div>

> [@steveb85as](#):
>
> el this is related to my issue here potentially

Thanks so much for sharing. Following your instructions for running the php doctrine commands, I still get the same error message.

I have not read the other article you posted yet, but will work on that now.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/1X/43c63600fe51440378769136903f1fa2a9a34102.png) [@system](https://forum.mautic.org/u/system)\
**Post date:** [August 12, 2024, 9:32pm UTC](https://forum.mautic.org/t/lamp-fails-to-start-installer-proces/32267/5 "2024-08-12T21:32:58Z")

</div>

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.
