I have tried to deploy a Symfony application by using the following tutorial: https://medium.com/@runawaycoin/deploying-symfony-4-application-to-shared-hosting-with-just-ftp-access-e65d2c5e0e3d
When trying to load the site I got a 500 internal server error. As per the tutorial I looked into my hosting error logs and saw a lot of stuff about DotEnv. Here's the first part of the output:
PHP Fatal error: Uncaught Symfony\Component\Dotenv\Exception\PathException: Unable to read the "/var/www/vhosts/137/332002/webspace/httpdocs/symfony_temp/.env" environment file. in /var/www/vhosts/137/332002/webspace/httpdocs/symfony_temp/vendor/symfony/dotenv/Dotenv.php:484
The tutorial tells me to store my env variables in other places like index.php for example. But looking at the code I see that bootstrap.php immediately calls DotEnv and tries to get data from there, which results in an error eventually I think.
How can I disable DotEnv, so that Symfony doesn't use it, and I can simply get my env variables from somewhere else? It is hosted in a hosting environment belonging to a customer where I think .htaccess doesn't allow access to DotEnv and I can't change that in this case as I have no authorization to edit that .htaccess file or even open it.