ERR_EMPTY_RESPONSE symfony2 - php

I've been working on a web application with Symfony2 for the past 6 months on my local server through Xampp. After uploading it to our server something is acting really weird, and we can't seem to find a solution for the problem. After a lot of research on the internet I found that many problems are causing this error, so I started to try and debug my code. After a while I'm not so sure that my code is causing the error.
The error I get is the following:
Chrome:
No data received
ERR_EMPTY_RESPONSE
Unable to load the webpage because the server sent no data.
Firefox:
Dutch error which probably sais; The connection was reset
Safari:
Safari can't open the page "domain" because the server unexpectedly dropped the connection. This sometimes occurs when the server is busy. Wait for a few minutes, and then try again.
The odd thing is that sometimes the page loads, but then after a couple of refreshes or trying a different time the same page gives the error? So it maybe has something to do with caching? I already disabled APC through the .htaccess file.
Here are some things that might be usefull:
Working with PHP Version 5.4.41.
OS X Yosemite Version 10.10.2 (for what its worth)
Symfony 2
FOSUserbundle
FOSRoutingbundle
Ddeboerbundle
knplabsbundle
If you want I can upload my error log, but this doesn't seem to give any errors at all.
This is a discussion from earlier which said that changing the php version solved the problem. The problem might have been the sessions, but I tried the application with these sessions off and still got the error. We changed the php server to 5.4 on our local server but the application still worked. So I guess these are both not the problem.
Symfony 2: session_start causes ERR_EMPTY_RESPONSE
Does anyone have a solution for how to tackle this problem? Or maybe a suggestion on how to receive a more specific error? Because I'm killing my brain here.

Related

apache not responding on localhost

I am using XAMPP to run localhost, I start apache & mysql like always and I receive no errors. It has been always working fine suddenly all projects that runs on wordpress keep loading for very long time then crashes and get an error on the browser apache not responding with no errors showing up on xampp logs. All static sites (html) are working fine.
I made sure nothing conflicting with the port. I got Skype and IIS on different ports and also disabled them to make sure but I'm still facing the same problem.
fixed it, was one wrong line of code in a wp_query on one of the wordpress sites.
but this is the first time i encounter something like this, a development error that does not throw any wordpress errors or PHP ones, instead it breaks Apache on localhost. Well at least i have learned something new that all weird issues could be tracked back to one messed up line of code.

upgraded to PHP7 on Windows: php_soap.dll causing crashes / frequent 500 errors

I have two servers, a test server running Windows 7... and a prod server running Windows Server 2008. (Yeah, it's unfortunate that they're different OS's.)
For months now, they've been running on PHP 5.4.1.4.
I decided to upgrade them to PHP 7. Everything went completely fine with the test box. But of course, it doesn't get much traffic.
On the prod / Windows Server 2008 box, it seems like, web apps would run for a minute or two and then show "500 error". I could refresh and sometimes they'd work again, sometime it'd take a few minutes.
Nothing is/was getting written to the NEW PHP error log (even though IIS's PHP Manager section showed that we were pointed to the correct INI and the correct log file).
The webserver failed request logs simply indicated that FastCGI was failing because of too many 500 errors.
I checked Event Viewer and I would see application crashes that would point to php_soap.dll.
Now, that file is THERE and it's the same size as the one I have over in non-prod.
Still, I thought perhaps it was because my scripts were getting 500 errors for a valid reason. So I investigated one of them. Confirmed that it was an exact match to a working one on the test box. Refreshed it...and it worked fine. Refreshed some more, 500 errors.
So, finally, I went into IIS Manager -> PHP Manager and disabled the SOAP extension.
I then STOPPED seeing the massive number of failed requests and I stopped seeing the 500 errors... for everything except the one script I have that makes SOAP calls.
I tried copying the dll from the test box over to the prod box. Enabled the extension again in PHP. The issue returned. So, I've pointed us back to the 5.4.1.4 config for now.
Any ideas on how I might figure out why this dll is causing issues and/or how to fix it?
Thanks!
-= Dave =-
I know this is old now but I had a similar problem and it turns out that the cached WDSL files are not binary compatible between versions of PHP.
By default in php.ini the SOAP module has caching enabled. In order to avoid a crash you'll either need to clear the current WDSL cache or change the cache location for the new PHP install.
Hope that helps...
I think I figured out a fix. I'm not sure why I'm only having to do this on the prod server, though: The directories that my scripts that make SOAP calls are in were set to allow both Anonymous Authentication and Windows Authentication. When I was manually testing things in my browser, it would accept me and run the script as Anonymous.
I suddenly realized a theory: my erroring script was being called by remote desktop gadgets...so it was probably defaulting too to executing anonymously. But I have another script with SOAP in it that's run by Scheduled Task (as a specific user). I had NOT seen that erroring!
So, I turned off Anonymous Authentication on the directory I was testing and reran my script from my browser. Sure, I had to log in, but it then worked! I checked my version of the Desktop Gadget that calls a SOAP script in that same directory...and it was now working too!
I think the key reason why I did not see this on the test machine is that we really don't have any Desktop Gadgets pointed to those proxy SOAP scripts over there. That, plus I had THOUGHT that my script that runs by Scheduled Task was failing on the prod machine, as I know I saw it throw 500 errors within the first few minutes after I activated PHP7 the first time....and that same Scheduled Task/script DOES run over on the test box.
Thanks!

Error 324 when signing in to PHPMyAdmin

I've been struggling with a frustrating problem for a few days and I'm being more and more confused; I can't login to PHPMyAdmin without receiving a Web Error 324 after about thirty seconds. The communication between MySQL and PHPMyAdmin is working but the failed login is the problem. I'm suspecting the configuration of PHP but I'm not sure.
I'm running a web server with Apache 2.0.64 with PHP 5.2.17 on Windows Server 2003 and I can run PHPINFO without problem.
I've reinstalled both Apache and PHP several times, but the problem is the same. Any ideas?
If you have this problem with Chrome, you can try the solutions posted here. If your problem is in any browser, then you have to check a bit more the related logs. Start with the logs from apache, then, you can check, and post, the response headers that live http headers gives you (firefox addon).
I've setup another web server now with the exact software environment and everything is running smooth on that one so there's probably something wrong with Windows. But I've to take that another day... Thank you for all support and help!

Error 324 (net::ERR_EMPTY_RESPONSE): in Google Chrome

I have a user saying that he is getting the following message when he visits any of our sites on our web server:
Error 324 (net::ERR_EMPTY_RESPONSE):
Done some googling and alot point to plugins, so we had a go with those first, but the problem still occured. Cleared cache which stopped the problem for a while, but it comes back. Sites are fine in all other browsers.
Found this which says something about a token, but don't know what they are talking about:
Getting Error 324 (net::ERR_EMPTY_RESPONSE). when using memcache in kohana
Help Please?
http://code.google.com/p/chromium/issues/detail?id=107576
adding -disable-ssl-false-start to the chrome start up seems to be a temp work around to the issue for this site
I had a similar case but with SSL only on an older version of lighttpd.
Since it's only Chrome causing the problem it feels like it might be due to Chrome's TLS False Start feature that was rolled out in early 2011 I believe.
In my case the problem was solved by upgrading lighttpd (to 1.4.28 for those interested).
More details about the False Start feature here:
http://www.z-car.com/blog/2010/12/10/google-chromes-new-false-start-feature

Debugging 500 Internal Server Error on PHP running on IIS7 cluster

Recently my ISP switched our website to an IIS7.0 high availibility cluster. The website is running on PHP5.2.1 and I can only upload files (so no registry tweaks). I had tested the website before and everything seemed to be working, but now the checkout page fails with:
500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.
As error messages go, this isn't very informative. I've tried:
ini_set('display_errors', 1);
ini_set('error_log', $file_php_can_write_to );
but both don't seem to do anything.
Anyone know how to get better debugging output?
Edit : Looks like we have a similar question in serverfault. Check it out
Turning off IIS7 custom errors will allow error responses from your application to be sent to remote clients without being censored by the IIS7’s custom errors module.
You can do this from the IIS7 Admin tool by running “Start>Run>inetmgr.exe”, selecting your website/application/virtual directory in the left-hand tree view, clicking on the “Error Pages” icon, clicking “Edit Feature Settings” action, and then selecting “Detailed Errors”
Source
It's very common when you change server you cannot load your apps. I have solved this problem running php.exe instead of loading your apps on the browser:
1) Run it using the Command line > C:\php\php.exe OR
2) Run Windows Explorer, look for it, and double click on c:\php\php.exe.
3) You are gonna see what DLL's are having conflicts and causing the 500 error.
4) Solve the conflicts finding the right DLL's for your windows version and you should be able to see your apps through the browser.
The best of the lucks.
IIS does this, it's really annoying and I could not find a fix, which is what caused me to switch to an Apache server for my local machine. Unfortunately, if you don't have control over your server, the best you can do is either test it locally on an apache set up or ask your host to allow the error messages.
I did some googling, thisthis looks like what you need. Wish that was around when I was trying to get IIS running.

Categories