Benny's Shopware Notebook
  • Introduction
    • How to Get in Touch
  • ddev for Shopware
    • Less than 5 Minutes Install with ddev and Symfony Flex
    • Storefront and Admin Watchers with ddev
    • Message Queue Setup with ddev
    • Contribute with ddev
    • Performance Tweaks
    • RabbitMQ with ddev
    • phpstan pro with ddev
    • Fetch Media from Production or Staging Server
  • Hosting
    • Setting up a Cloud Server with ddev
    • How to Trouble-shoot and Evaluate Environment Variables
    • Media URLs Out Of Sync between Servers
    • RabbitMQ
    • Running Shopware CE with PaaS
    • SFTP-Users
    • Basic-Auth for Shopware 6 with nginx
    • How to Avoid Failed Systemd Units
    • JWT-Secrets as Environment Variables
  • Deployment
    • Close-to-Zero Downtime Deployment
    • Docker-Images for Deployment with Gitlab-Runners
    • PHP Cache Related Issues
  • Development
    • Patching the Core
    • How to Discover Available Updates?
    • Local Testing of Shopware Commercial Features
  • Administration
  • Database
  • Migration
    • Side Effects
Powered by GitBook
On this page
  • Environment Variables set in the Command Line
  • Is there a .env.local.php File?
  • Evaluate .env Files

Was this helpful?

  1. Hosting

How to Trouble-shoot and Evaluate Environment Variables

This page explains how to trouble-shoot and evaluate environment variables

Environment Variables set in the Command Line

The first thing to note is that any setting for a variable on the command line overrides what is defined in any .env file. So, depending on your problem, check your crontabs and scripts for any 'hidden' variable settings.

Is there a .env.local.php File?

An .env.local.php file is generated by the `bin/console dotenv:dump' command, typically within your deployment pipeline. If an .env.local.php file exists, then its definitions take precedence over any other .env file. Either apply your changes to the .env.local.php file (which makes them non-persistent), or delete the .env.local.php file and apply your changes to .env. .env.local, .env.dist or .env.dist.local (depending on whether you want your changes to eventually go to the repo or not).

Evaluate .env Files

The bin/console debug:dotenv command is your friend. Remember, though, that anything shown here will be overwritten by one of the two methods above - and, worst of all, its effects won't be shown here!

PreviousSetting up a Cloud Server with ddevNextMedia URLs Out Of Sync between Servers

Last updated 1 year ago

Was this helpful?