This question is not about why and how to fix this error, but why I’m getting it in production mode for Symfony 3.4.37 (
error is imitated by me via changing MySQL host to wrong one )
Recently we updated from symfony 3.1 to 3.4.37 and today we noticed that our project throwing error on production environment.
Weird is as you can see in screenshot it as no symfony error page design but just pure error message (message of error is not important)
We are using app.php where AppKernel(‘prod’, false);
$loader = require __DIR__.'/../app/autoload.php'; include_once __DIR__.'/../var/bootstrap.php.cache'; $kernel = new AppKernel('prod', false); $kernel->loadClassCache(); $request = Request::createFromGlobals(); $response = $kernel->handle($request); $response->send(); $kernel->terminate($request, $response);
So logically we have to see 500 error on symfony page instead and not fetal error …
Question: Can it be some bug of symfony 3.4.37 ? or we are missing something in production configuration ?
As a tmp workaround ( not a solution ) i found only standard error hiding option by adding this 2 lines at the top in app.php
error_reporting(0); ini_set('display_errors', 0);
Source: Symfony Questions
Was this helpful?
0 / 0