Answer the question
In order to leave comments, you need to log in
How to run a project on Symfony2?
The project is implemented on Symfony 2 and everything works fine in the dev environment, i.e. when requesting /app_dev.php, but when trying to execute a request in the prod environment for /app.php, an exception is thrown:
1/1 RuntimeException: The Expires HTTP header is not parseable (-1).
in /www/app/cache/prod/classes.php line 2576
at HeaderBag->getDate('Expires') in /www/app/cache/prod/classes.php line 4181
at Response->getExpires() in /www /app/cache/prod/classes.php line 4209
at Response->getMaxAge() in /www/app/cache/prod/classes.php line 4236
at Response->getTtl() in /www/vendor/symfony/symfony /src/Symfony/Component/HttpKernel/HttpCache/EsiResponseCacheStrategy.php line 45
at EsiResponseCacheStrategy->add(object(Response)) in /home/www/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/HttpCache .php line 207
at HttpCache->handle(object(Request)) in /home/www/web/app.php line 22
Answer the question
In order to leave comments, you need to log in
Turn off AppCache in web/app.php. An error with ESI, and if it is incomprehensible to you, then you most likely do not use this feature.
You clearly see from the error message and stacktrace that the problem is with HTTP caching. You have to dig in this direction. As for clearing the cache, I remember that when updating vendors, this all happens only for the dev environment.
As already written above, try refreshing the cache:
php app/console cache:clear --env=prod
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question