V
V
Vladislav Verilov2021-08-13 11:38:56
symfony
Vladislav Verilov, 2021-08-13 11:38:56

Symfony error with dotoenv, what to do?

Hello, I'm trying to run a project on an open server and I'm getting this error.

! ) Fatal error: Uncaught Symfony\Component\Dotenv\Exception\PathException: Unable to read the "W:\/Program Files (x86)/OpenServer/domains/my.loc//.env" environment file. in W:\domains\my.loc\vendor\symfony\dotenv\Dotenv.php on line 565
( ! ) Symfony\Component\Dotenv\Exception\PathException: Unable to read the "W:\/Program Files (x86)/OpenServer/domains/my.loc//.env" environment file. in W:\domains\my.loc\vendor\symfony\dotenv\Dotenv.php on line 565
Call Stack
#   Time    Memory  Function    Location
1   0.0002  395368  {main}( )   ...\index.php:0
2   0.0004  401368  require_once( 'W:\domains\my.loc\vendor\autoload_runtime.php )  ...\index.php:5
3   0.0212  2749440 Symfony\Component\Runtime\SymfonyRuntime->__construct( $options = ['project_dir' => 'W:\\/Program Files (x86)/OpenServer/domains/my.loc/'] )    ...\autoload_runtime.php:23
4   0.0230  2972104 Symfony\Component\Dotenv\Dotenv->bootEnv( $path = 'W:\\/Program Files (x86)/OpenServer/domains/my.loc//.env', $defaultEnv = 'dev', $testEnvs = [0 => 'test'] )  ...\SymfonyRuntime.php:102
5   0.0231  2972200 Symfony\Component\Dotenv\Dotenv->loadEnv( $path = 'W:\\/Program Files (x86)/OpenServer/domains/my.loc//.env', $envKey = 'APP_ENV', $defaultEnv = 'dev', $testEnvs = [0 => 'test'] ) ...\Dotenv.php:157
6   0.0232  2972296 Symfony\Component\Dotenv\Dotenv->load( $path = 'W:\\/Program Files (x86)/OpenServer/domains/my.loc//.env' ) ...\Dotenv.php:114
7   0.0232  2972672 Symfony\Component\Dotenv\Dotenv->doLoad( $overrideExistingVars = FALSE, $paths = [0 => 'W:\\/Program Files (x86)/OpenServer/domains/my.loc//.env'] )    ...\Dotenv.php:92

I'm dumb and don't understand what to do, dotenv is installed, all components have been updated

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sl0, 2021-08-13
@inefablecl

"W:\/Program Files (x86)/OpenServer/domains/my.loc {//} .env"
Be careful with paths

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question