EnvVarProcessor.php line 76 - exception "Environment variable not found"

Your software
My Mautic version is: 3.1
My PHP version is: 7.3.22

Your problem
My problem is: I’m getting errors from Mautic in apache’s error_log

These errors are showing in the log:

EnvNotFoundException: Environment variable not found: "MAUTIC_DB_TABLE_PREFIX". - in file /var/www/mmm.mysite.com/vendor/symfony/dependency-injection/EnvVarProcessor.php - at line 76
EnvNotFoundException: Environment variable not found: "MAUTIC_REQUEST_CONTEXT_BASE_URL". - in file /var/www/mmm.mysite.com/vendor/symfony/dependency-injection/EnvVarProcessor.php - at line 76

And there’s many of them

The environment variables MAUTIC_DB_TABLE_PREFIX and MAUTIC_REQUEST_CONTEXT_BASE_URL are the 2 ones reported

Steps I have tried to fix the problem:

I looked into EnvVarProcessor.php at line 76 but didn’t find anything obviously wrong

In app/config/local.php I have 'db_table_prefix' => NULL,
And didn’t find anything related to MAUTIC_REQUEST_CONTEXT_BASE_URL

So far I don’t know if this is a big problem or not, my Mautic system seems to work OK.
But anyway any hint to get rid of these error messages is welcome.

getting the same error! is it solved yet?

1 Like

I’m now running Mautic v3.3.2 and these errors don’t show up anymore.

1 Like

I am on 3.3.3 and report a series of these errors on line 76.

My mautic install works fine so far.

Did you solve this? I have the same issue on v4.0 (the MAUTIC_WEBROOT) env variable not found.