Unable to create the cache directory

Mautic v2.16.3
My PHP version is 7.4

I launch:
php app/console cache:clear -v

and I recevieve this
[RuntimeException]
Unable to create the cache directory (/home/…/app/cache/prod)

Exception trace:
() at /home2/…/app/AppKernel.php:548
AppKernel->buildContainer() at /home2/…/app/AppKernel.php:514
AppKernel->initializeContainer() at /home2/…/app/AppKernel.php:276
AppKernel->boot() at /home2/…/vendor/symfony/framework-bundle/Console/Application.php:62
Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /home2/…/vendor/symfony/console/Application.php:117
Symfony\Component\Console\Application->run() at /home2/…/app/console:43

some suggestions for installing 3.x
thanks

Hi there, 7.4 support is not yet implemented, please drop to 7.3. Requirements can be found here: https://www.mautic.org/download/requirements.

1 Like

Hi @rcheesley,
thanks but this is not the solution. The same error with PHP 7.2.31
Is correct that in the log appears home2 instead of home???

php --version

PHP 7.2.31 (cli) (built: Jun 15 2020 20:54:25) ( NTS )
Copyright © 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright © 1998-2018 Zend Technologies
with the ionCube PHP Loader + ionCube24 v10.3.9, Copyright © 2002-2019, by ionCube Ltd.
with Zend OPcache v7.2.31, Copyright © 1999-2018, by Zend Technologies

php app/console cache:clear -v

[RuntimeException]
Unable to create the cache directory (/home/…/app/cache/prod)

Exception trace:
() at /home2/…/app/AppKernel.php:548
AppKernel->buildContainer() at /home2/…/app/AppKernel.php:514
AppKernel->initializeContainer() at /home2/…/app/AppKernel.php:276
AppKernel->boot() at /home2/…/vendor/symfony/framework-bundle/Console/Application.php:62
Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /home2/…/vendor/symfony/console/Application.php:117
Symfony\Component\Console\Application->run() at /home2/…/app/console:43

Clear the cache as the user that owns the mautic directory, this might help: Please How are CACHES deleted Mautic 3?

Let us know how it goes!

Sounds to me like file/folder permission issues. Take a look at the docs here:

@devsrealm @rcheesley thanks a lot.
Our provider recently moved the mautic instance to another server cause to server problems. They make some mistakes in the folders’ property :mask:

2 Likes