I am currently developing a web application with Symfony that's supposed to connect to a remote Web-Service. Then synchronise database from the client to the server and vice-versa and some other crap.
The Web-service server is on an IIS in the LAN. Symfony2 is running with Wamp on my machine.
So, the connexion and request code to the web-service in a simple php script is perfectly functional. Or at least, it does what I want it to do. And any connexion to the IIS server is perfectly fine. A bit slow though, but the machine is quite a mess.
Now I put that same code into a Symfony2 class, and here comes the hell. When I try to load that page, I get a
101 error (ERR_CONNECTION_RESET)
Web-service server's log indicates me that the login, request and response were sent. So my guess is the problem is comin' from my machine, but not quite sure about it.
The really funny thing : I somehow managed to make it work for about 10 times. Then 101 again...
I disabled the Windows 7 LAN firewall both side, same result.
Any clue is very welcome. Thanks.
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 resave TwigBundle/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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With