2016-11-28 5 views
0

Я только что развернул приложение на основе Symfony2 в учетной записи AWS (на экземпляре EC2 с использованием Ubuntu 16.04) после настройки веб-среды (Apache2, MySQL, PHP7). Файл Ubuntu /var/www/html/index.html по умолчанию отображается правильно. Но когда дело доходит до Symfony2, у меня есть пустая страница с app.php и app_dev.php. Когда я тестирую инструмент отладки Filezilla, я вижу сообщение об ошибке «500 Internal Server Error». Symfony2 config.php указывает, что теперь все в порядке, мне просто нужно добавить значение date.timezone на php.ini. Мои файлы .htaccess хорошо настроены, так как я использую ту же модель, которая работает на других основанных на Symfony2 веб-сайтах, которые я создал ранее.Пустая страница с приложением Symfony2

Это то, что я имею на /logs/dev.log:

[2016-11-27 18:23:09] event.DEBUG: Notified event "console.command" to listener "Symfony\Component\HttpKernel\EventListener\DebugHandlersListener::configure". [] [] 
[2016-11-27 18:23:09] event.DEBUG: Notified event "console.command" to listener "Symfony\Bridge\Monolog\Handler\ConsoleHandler::onCommand". [] [] 
[2016-11-27 18:23:09] event.DEBUG: Notified event "console.command" to listener "Symfony\Bridge\Monolog\Handler\ConsoleHandler::onCommand". [] [] 
[2016-11-27 18:23:09] event.DEBUG: Notified event "console.terminate" to listener "Symfony\Bundle\SwiftmailerBundle\EventListener\EmailSenderListener::onTerminate". [] [] 
[2016-11-27 18:23:09] event.DEBUG: Notified event "console.terminate" to listener "Symfony\Bridge\Monolog\Handler\ConsoleHandler::onTerminate". [] [] 
[2016-11-27 18:23:09] event.DEBUG: Notified event "console.terminate" to listener "Symfony\Bridge\Monolog\Handler\ConsoleHandler::onTerminate". [] [] 
[2016-11-27 18:39:22] event.DEBUG: Notified event "console.command" to listener "Symfony\Component\HttpKernel\EventListener\DebugHandlersListener::configure". [] [] 
[2016-11-27 18:39:22] event.DEBUG: Notified event "console.command" to listener "Symfony\Bridge\Monolog\Handler\ConsoleHandler::onCommand". [] [] 
[2016-11-27 18:39:22] event.DEBUG: Notified event "console.command" to listener "Symfony\Bridge\Monolog\Handler\ConsoleHandler::onCommand". [] [] 
[2016-11-27 18:39:22] event.DEBUG: Notified event "console.terminate" to listener "Symfony\Bundle\SwiftmailerBundle\EventListener\EmailSenderListener::onTerminate". [] [] 
[2016-11-27 18:39:22] event.DEBUG: Notified event "console.terminate" to listener "Symfony\Bridge\Monolog\Handler\ConsoleHandler::onTerminate". [] [] 
[2016-11-27 18:39:22] event.DEBUG: Notified event "console.terminate" to listener "Symfony\Bridge\Monolog\Handler\ConsoleHandler::onTerminate". [] [] 
[2016-11-28 00:44:05] event.DEBUG: Notified event "console.command" to listener "Symfony\Component\HttpKernel\EventListener\DebugHandlersListener::configure". [] [] 
[2016-11-28 00:44:05] event.DEBUG: Notified event "console.command" to listener "Symfony\Bridge\Monolog\Handler\ConsoleHandler::onCommand". [] [] 
[2016-11-28 00:44:05] event.DEBUG: Notified event "console.command" to listener "Symfony\Bridge\Monolog\Handler\ConsoleHandler::onCommand". [] [] 
[2016-11-28 00:44:05] php.DEBUG: The Symfony\Bundle\MonologBundle\DependencyInjection\Compiler\DebugHandlerPass class is deprecated since version 2.12 and will be removed in 3.0. Use AddDebugLogProcessorPass in FrameworkBundle instead. {"type":16384,"file":"/var/www/html/vendor/symfony/monolog-bundle/DependencyInjection/Compiler/DebugHandlerPass.php","line":14,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Defining the initRuntime() method in the "form" extension is deprecated since version 1.23. Use the `needs_environment` option to get the Twig_Environment instance in filters, functions, or tests; or explicitly implement Twig_Extension_InitRuntimeInterface if needed (not recommended). {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":794,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Twig Test "sameas" is deprecated since version 1.21. Use "same as" instead in WebProfilerBundle:Collector:form.html.twig at line 611. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/ExpressionParser.php","line":646,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Twig Test "sameas" is deprecated since version 1.21. Use "same as" instead in form_div_layout.html.twig at line 205. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/ExpressionParser.php","line":646,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Twig Test "sameas" is deprecated since version 1.21. Use "same as" instead in form_div_layout.html.twig at line 323. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/ExpressionParser.php","line":646,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Twig Test "sameas" is deprecated since version 1.21. Use "same as" instead in form_div_layout.html.twig at line 325. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/ExpressionParser.php","line":646,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Twig Test "sameas" is deprecated since version 1.21. Use "same as" instead in form_div_layout.html.twig at line 337. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/ExpressionParser.php","line":646,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Twig Test "sameas" is deprecated since version 1.21. Use "same as" instead in form_div_layout.html.twig at line 339. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/ExpressionParser.php","line":646,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Twig Test "sameas" is deprecated since version 1.21. Use "same as" instead in form_div_layout.html.twig at line 351. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/ExpressionParser.php","line":646,"level":4352} [] 
[2016-11-28 00:44:06] php.DEBUG: Twig Test "sameas" is deprecated since version 1.21. Use "same as" instead in form_div_layout.html.twig at line 353. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/ExpressionParser.php","line":646,"level":4352} [] 
[2016-11-28 00:44:06] event.DEBUG: Notified event "console.terminate" to listener "Symfony\Bundle\SwiftmailerBundle\EventListener\EmailSenderListener::onTerminate". [] [] 
[2016-11-28 00:44:06] event.DEBUG: Notified event "console.terminate" to listener "Symfony\Bridge\Monolog\Handler\ConsoleHandler::onTerminate". [] [] 
[2016-11-28 00:44:06] event.DEBUG: Notified event "console.terminate" to listener "Symfony\Bridge\Monolog\Handler\ConsoleHandler::onTerminate". [] [] 

Я также проверил /var/log/apache2/error.log:

[Mon Nov 28 06:25:02.181251 2016] [mpm_prefork:notice] [pid 13742] AH00163: Apa$ 
[Mon Nov 28 06:25:02.181268 2016] [core:notice] [pid 13742] AH00094: Command li$ 
[Mon Nov 28 09:34:27.731905 2016] [:error] [pid 18830] [client 41.251.22.4:4926$ 
[Mon Nov 28 09:34:27.732394 2016] [:error] [pid 18830] [client 41.251.22.4:4926$ 
[Mon Nov 28 09:35:51.425233 2016] [:error] [pid 18832] [client 41.251.22.4:5048$ 
[Mon Nov 28 09:38:09.621647 2016] [:error] [pid 18829] [client 41.251.22.4:5103$ 
[Mon Nov 28 09:38:09.621901 2016] [:error] [pid 18829] [client 41.251.22.4:5103$ 
[Mon Nov 28 09:46:16.528434 2016] [:error] [pid 18831] [client 41.251.22.4:2130$ 
[Mon Nov 28 09:46:16.528644 2016] [:error] [pid 18831] [client 41.251.22.4:2130$ 
[Mon Nov 28 09:48:41.956055 2016] [:error] [pid 18832] [client 41.251.22.4:5224$ 
[Mon Nov 28 09:48:41.956345 2016] [:error] [pid 18832] [client 41.251.22.4:5224$ 
[Mon Nov 28 09:49:06.614155 2016] [:error] [pid 18829] [client 41.251.22.4:5228$ 
[Mon Nov 28 09:49:06.614356 2016] [:error] [pid 18829] [client 41.251.22.4:5228$ 
[Mon Nov 28 10:07:58.290011 2016] [:error] [pid 18831] [client 41.251.22.4:5284$ 
[Mon Nov 28 10:07:58.290215 2016] [:error] [pid 18831] [client 41.251.22.4:5284$ 
[Mon Nov 28 10:09:25.032732 2016] [:error] [pid 21233] [client 41.251.22.4:5287$ 
[Mon Nov 28 10:09:25.032947 2016] [:error] [pid 21233] [client 41.251.22.4:5287$ 
[Mon Nov 28 10:09:44.034353 2016] [:error] [pid 18829] [client 41.251.22.4:5288$ 
[Mon Nov 28 10:09:44.034556 2016] [:error] [pid 18829] [client 41.251.22.4:5288$ 

Любые подсказки о том, как я можете использовать эту информацию для решения моей проблемы, особенно в журналах?

ответ

0

Я смог решить эту проблему, запустив активы приложения/консоли: установить и очистить кеш в среде dev (кеш приложения/консоли: очистить). Тогда мне пришлось иметь дело со следующим исключением:

RuntimeException в ClassCollectionLoader.php строке 239: Не удалось записать файл кэша «/var/www/html/app/cache/dev/classes.php».

Что я оставляю за собой, следуя инструкциям, приведенным здесь: http://symfony.com/doc/2.7/setup/file_permissions.html

Для системы Linux:

$ rm -rf app/cache/* 
$ rm -rf app/logs/*  

$ HTTPDUSER=`ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data| 

[n]ginx' | grep -v root | head -1 | cut -d\ -f1` 
# if this doesn't work, try adding `-n` option 
$ sudo setfacl -R -m u:"$HTTPDUSER":rwX -m u:`whoami`:rwX app/cache app/logs 
$ sudo setfacl -dR -m u:"$HTTPDUSER":rwX -m u:`whoami`:rwX app/cache app/logs