I just updated my symfony version from 3.4.1 to 3.4.2 using the composer update command (everything is OK).
when I tried to start the server, I get the following message:
Warning: require (index.php): could not open the stream: there is no such file or in the directory (...) of the provider \ Symfony \ Symfony \ SRC \ Symfony \ Bundle \ WebServerBundle \ Resources \ router.php on line 45
Fatal error: require (): Failed to open the window "index.php" (include_path = 'C: \ xampp \ php \ PEAR') in the (...) provider \ Symfony \ Symfony \ SRC \ Symfony \ Bundle \ WebServerBundle \ Resources \ router.php on line 45
He refers to this world of code.
$script = getenv('APP_FRONT_CONTROLLER') ?: 'index.php'; //var_dump(getenv('APP_FRONT_CONTROLLER')); //die(); $_SERVER = array_merge($_SERVER, $_ENV); $_SERVER['SCRIPT_FILENAME'] = $_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR.$script; // Since we are rewriting to app_dev.php, adjust SCRIPT_NAME and PHP_SELF accordingly $_SERVER['SCRIPT_NAME'] = DIRECTORY_SEPARATOR.$script; $_SERVER['PHP_SELF'] = DIRECTORY_SEPARATOR.$script; require $script; //<==== HERE!!!
When I dump in the $ script variable, my result is false (there is no env variable called APP_FRONT_CONTROLLER), but when I start the server in another version 3.4.1 symfony, the result
line (11) "app_dev.php"
and everything is working fine.
Is this a version problem or a problem from my env.
If you need more information, just ask about it.
early.
source share