Mautic 5 installation , error 500 in navigator when I process to configure Mautic

Your software
My Mautic version is: 5.0.3
My PHP version is: 8.1.27
My Database type and version is: 10.11.6


composer diagnose
Do not run Composer as root/super user! See How do I install untrusted packages safely? Is it safe to run Composer as superuser or root? - Composer for details
Continue as root/super user [yes]? yes
Checking composer.json: WARNING
License “GPL-3.0” is a deprecated SPDX license identifier, use “GPL-3.0-only” or “GPL-3.0-or-later” instead
Checking platform settings: OK
Checking git settings: OK git version 2.39.2
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com rate limit: OK
Checking disk free space: OK
Composer version: 2.5.5
PHP version: 8.0.2 - Package overridden via config.platform, actual: 8.1.27
PHP binary path: /usr/bin/php8.1
OpenSSL version: OpenSSL 3.0.11 19 Sep 2023
cURL version: 7.88.1 libz 1.2.13 ssl OpenSSL/3.0.11
zip: extension present, unzip present, 7-Zip present (7z)


Your problem
My problem is: I have 500 euro problem when I process to configure Mautic 5 with navigator

These errors are showing in the log:

PHP Fatal error: Uncaught Symfony\Component\Dotenv\Exception\PathException: Unable to read the “/home/aut/public_html/.env” environment file. in /home/aut/public_html/vendor/symfony/dotenv/Dotenv.php:568
Stack trace:
#0 /home/aut/public_html/vendor/symfony/dotenv/Dotenv.php(115): Symfony\Component\Dotenv\Dotenv->doLoad()
#1 /home/aut/public_html/app/config/bootstrap.php(20): Symfony\Component\Dotenv\Dotenv->loadEnv()
#2 /home/aut/public_html/app/console-application.php(36): require(‘…’)
#3 /home/aut/public_html/bin/console(15): include(‘…’)
#4 {main}
thrown in /home/aut/public_html/vendor/symfony/dotenv/Dotenv.php on line 568
Script bin/console mautic:assets:generate handling the generate-assets event returned with error code 255
Script @generate-assets was called via post-install-cmd

Steps I have tried to fix the problem:

composer reinstall “mautic/*”

This is a PHP error message that indicates that the application is unable to read the .env file located in the /home/aut/public_html/ directory. The error is caused by a PathException thrown in the Dotenv.php file of the symfony/dotenvcomponent.

The error message also states that the script that caused the error is bin/console mautic:assets:generate, which is triggered by the generate-assets event in the post-install-cmd configuration.

To resolve this issue, you should check the following:

  • Verify that the .env file exists in the correct directory and has the correct permissions.
  • Ensure that the symfony/dotenv component is installed and up to date.
  • Check the bin/console and app/console-application.php files for any configuration errors or misconfigurations that may be causing the issue.

If you are still unable to resolve the issue, you may need to consult the application’s documentation or seek help from the support team or community.

=> i have change the directory and this issue is resolved but I have 500 error in my navigator

Cache clears and problem resolved

sudo -u www-data php /var/www/html/mautic/docroot/app/console-application.php cache:clear
sudo -u www-data php bin/console cache:warmup
sudo -u www-data php bin/console mautic:assets:generate

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