Since I migrated my Symfony 2.1 I'm having a problem with the WebProfilerBundle. The profiler bar is shown, but when I click on a link it will show a blank page. In the PHP error file the following error is shown.
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 4194304 bytes) in C:\Work\Projects\DirectpayLogin\solution\vendor\symfony\symfony\src\Symfony\Component\Stopwatch\StopwatchEvent.php on line 102
The error location is random. So not always StopwatchEvent.php.
I've narrowed down the problem to this file: \vendor\symfony\symfony\src\Symfony\Bundle\WebProfilerBundle\Resources\views\Profiler\layout.html.twig
In this template the twig render service functions are causing the problem. If I replace the render service with render controller is does work.
So I'm replacing this line: {{ render(path('_wdt', { 'token': token, 'position': 'normal' })) }} With this line: {% render controller('web_profiler.controller.profiler:toolbarAction',{ 'token': token, 'position': 'normal' }) %}
So it seems my Symfony has a problem with rendering controllers as a service. But why? The problem started from version 2.2 and I'm now running 2.7.
Setting my php.ini memory_limit to -1 will still give this error. It will only take longer. It seems to be a loop of some kind.
PHP version is 5.6 and my dev pc runs windows 7 and iis 7
I really hope someone can help me with this.