Running Symfony 2.7.8.
It has always worked like a charm: I did something like
{{ dump(undefinedVariable) }}
and it in dev mode twig told me that the variable was not defined.
Now it does not tell me anylonger: I have an ugly 500 error page (not symfony's) and no toolbar. Like I was running on prod instead of dev. But I'm sure I'm in dev, as if I remove the incriminated line the page gets rendered and I have symfony's bar telling me I'm in dev.
The strange thing is that the other developer running the same project on his machine does not experience the issue. Could it be something related to my configuration of Apache?
Thank you!
EDIT1: Apache log is clear. Symfony log last entries are:
[]
[2016-01-11 10:35:31] event.DEBUG: Notified event "kernel.response" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\HttpCacheListener::onKernelResponse". [] []
[2016-01-11 10:35:31] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Component\HttpKernel\EventListener\ProfilerListener::onKernelResponse". [] []
[2016-01-11 10:35:31] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Bundle\WebProfilerBundle\EventListener\WebDebugToolbarListener::onKernelResponse". [] []
[2016-01-11 10:35:31] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Component\HttpKernel\EventListener\SaveSessionListener::onKernelResponse". [] []
[2016-01-11 10:35:31] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Component\HttpKernel\EventListener\StreamedResponseListener::onKernelResponse". [] []
[2016-01-11 10:35:31] event.DEBUG: Notified event "kernel.finish_request" to listener "Symfony\Component\HttpKernel\EventListener\LocaleListener::onKernelFinishRequest". [] []
[2016-01-11 10:35:31] event.DEBUG: Notified event "kernel.finish_request" to listener "Symfony\Component\HttpKernel\EventListener\TranslatorListener::onKernelFinishRequest". [] []
[2016-01-11 10:35:31] event.DEBUG: Notified event "kernel.finish_request" to listener "Symfony\Component\HttpKernel\EventListener\RouterListener::onKernelFinishRequest". [] []
[2016-01-11 10:35:31] event.DEBUG: Notified event "kernel.finish_request" to listener "Symfony\Component\Security\Http\Firewall::onKernelFinishRequest". [] []
[2016-01-11 10:35:31] event.DEBUG: Notified event "kernel.terminate" to listener "Symfony\Bundle\SwiftmailerBundle\EventListener\EmailSenderListener::onTerminate". [] []
[2016-01-11 10:35:31] event.DEBUG: Notified event "kernel.terminate" to listener "Symfony\Component\HttpKernel\EventListener\ProfilerListener::onKernelTerminate". [] []
EDIT2: I think we can rule out Apache. The behavior is exactly the same if I use Symfony's webserver. Enabling the --verbose option does not provide any clue on why the 500 (but the server keeps running) :/
EDIT3 The response header from the server seems properly formatted, but I cannot get the body (at least the browsers consoles tell me there isn't any). This is the header:
Request URL:http://localhost:8000/app_dev.php/onboardingGuide/edit/31
Request Method:GET
Status Code:500 Internal Server Error
Remote Address:[::1]:8000
Response Headers
view source
Connection:close
Content-Length:0
Content-Type:text/html; charset=UTF-8
Date:Tue, 12 Jan 2016 09:52:55 GMT
Server:Apache/2.4.16 (Win32) OpenSSL/1.0.1p PHP/5.6.12
X-Powered-By:PHP/5.6.12
Request Headers
view source
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Encoding:gzip, deflate, sdch
Accept-Language:it-IT,it;q=0.8,en-US;q=0.6,en;q=0.4
Cache-Control:max-age=0
Connection:keep-alive
Cookie:PHPSESSID=etrtngod29m8odpepoi6kvgr66
Host:localhost:8000
Upgrade-Insecure-Requests:1
User-Agent:Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36
/var/logs/apache2/error.log. Check that out, or better still usetail -f /var/logs/apache2/error.logand reload the page. you should see the offending issue pop up. As youre not getting a Symfony error it does imply that its not getting as far that.symfony-directory/app/logs/dev.logfile?