ERR_CONNECTION_RESET with symfony2 but not with PHP script ERR_CONNECTION_RESET with symfony2 but not with PHP script symfony symfony

ERR_CONNECTION_RESET with symfony2 but not with PHP script


I spent hours debugging this with a colleague. He was getting the same error but it was working properly on my machine (we're using Windows 7, 64bit, WAMPServer 2.2d, 32bit).
Here is what the culprit was:
- the file TwigEngine.php had Unix-style line endings (LF) on my machine but on his machine it had Windows-style line endings (CR+LF)
- after changing the line endings to LF only, it works fine on his machine too

That would possibly explain the other answer above "all I needed to do is just resaveTwigBundle/TwigEngine.php" if the editor changed the format of the line endings.

The underlying cause was the installation of git, he had picked the default ("Windows-style check-outs") and I had selected "as-is").

After some more research. here is an explanation of the cause for this: https://github.com/symfony/symfony/issues/3216

Hopefully this helps someone else save some time.


I solve the problem...

I set the second parameter of AppKernel in app_dev.php to FALSE and now works fine

$kernel = new AppKernel('dev', FALSE);

I will continue investigating...


I had same problem after 4 hours of "debuging" i found that all I needed to do is just resave

TwigBundle/TwigEngine.php

I have no clue why