diff --git a/symfony/framework-bundle/3.3/post-install.txt b/symfony/framework-bundle/3.3/post-install.txt index 6aaefd13..63d5e10c 100644 --- a/symfony/framework-bundle/3.3/post-install.txt +++ b/symfony/framework-bundle/3.3/post-install.txt @@ -5,7 +5,7 @@ * Run your application: 1. Change to the project directory 2. Create your code repository with the git init command - 3. Execute the php -S 127.0.0.1:8000 -t public command + 3. Execute the php -S 127.0.0.1:8000 -t public public/index.php command 4. Browse to the http://localhost:8000/ URL. Quit the server with CTRL-C. diff --git a/symfony/framework-bundle/3.3/public/index.php b/symfony/framework-bundle/3.3/public/index.php index 5283b7ce..7e5d9e9b 100644 --- a/symfony/framework-bundle/3.3/public/index.php +++ b/symfony/framework-bundle/3.3/public/index.php @@ -19,6 +19,10 @@ $env = $_SERVER['APP_ENV'] ?? $_ENV['APP_ENV'] ?? 'dev'; $debug = (bool) ($_SERVER['APP_DEBUG'] ?? $_ENV['APP_DEBUG'] ?? ('prod' !== $env)); if ($debug) { + // Compatibility with the built-in PHP web server + if ('/index.php' !== $_SERVER['SCRIPT_NAME'] && is_file(__DIR__.$_SERVER['SCRIPT_NAME'])) { + return false; + } umask(0000); Debug::enable(); diff --git a/symfony/framework-bundle/4.2/post-install.txt b/symfony/framework-bundle/4.2/post-install.txt index 6aaefd13..63d5e10c 100644 --- a/symfony/framework-bundle/4.2/post-install.txt +++ b/symfony/framework-bundle/4.2/post-install.txt @@ -5,7 +5,7 @@ * Run your application: 1. Change to the project directory 2. Create your code repository with the git init command - 3. Execute the php -S 127.0.0.1:8000 -t public command + 3. Execute the php -S 127.0.0.1:8000 -t public public/index.php command 4. Browse to the http://localhost:8000/ URL. Quit the server with CTRL-C. diff --git a/symfony/framework-bundle/4.2/public/index.php b/symfony/framework-bundle/4.2/public/index.php index bdcf5f4d..6a6b9202 100644 --- a/symfony/framework-bundle/4.2/public/index.php +++ b/symfony/framework-bundle/4.2/public/index.php @@ -19,6 +19,10 @@ $env = $_SERVER['APP_ENV'] ?? $_ENV['APP_ENV'] ?? 'dev'; $debug = (bool) ($_SERVER['APP_DEBUG'] ?? $_ENV['APP_DEBUG'] ?? ('prod' !== $env)); if ($debug) { + // Compatibility with the built-in PHP web server + if ('/index.php' !== $_SERVER['SCRIPT_NAME'] && is_file(__DIR__.$_SERVER['SCRIPT_NAME'])) { + return false; + } umask(0000); Debug::enable();