apache not responding on localhost - php

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.

Related

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!

ERR_EMPTY_RESPONSE symfony2

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.

Mediawiki engine only works on Lan, works intermittently externally

I have recently installed a LAMP server running ubuntu server 11.04. I am trying to run a private mediawiki engine online, version 1.17.0. For some odd reason it works perfectly on the LAN only, when I use an external network, it would continue load forever and proceed to being timed out. Other folders I have seemed to be doing fine externally so I believe my network configuration should be ok. Sometimes when I do get lucky (like 10% of the time), it will load normally for a few pages and resume once again to hanging. If I stop the page load it would appear but the skin would be missing.
I used firebug and found that 2 processes with something like load.php/debug=false....style:skin=vector that is hanging while all the other files load fine. If I stopped all the extensions, killed both common.js and common.css, and prevent the use of javascript on the site, it would work fine (relatively speaking, it would load everything quickly). I think it is a javascript problem but I am not sure where to look for an error log for java.
When checking the firefox error console I also noted the same error location had a "message: expected '}'". However, when running in the LAN it has the same message but it still works fine. I tried looking through all possible resources but to no avail.
Finally found the solution to this problem: it was a networking issue afterall. I checked all the logs and could not find anything. But found that the problem was that the ubuntu was running under a dchp setting so I changed it into a static ip mode and now it works perfectly. Althought I don't understand why it would make a difference between broadcasting via LAN only vs. external, it works perfectly now. Thanks to anyone who tried

suddenly "my http Apache server stopped working" using xampp

every thing was fine suddenly my server stopped working there is nothing in error logs phpmyadmin is working fine the problem occurs when i am my project first home.php page loaded but when i am sign in entering email id and password server stopped working .
(i have not changed any thing in php.ini)
(earlier it was working fine)
pl
thanks
So, if I understand correctly, the server stops working after you log in? But phpmyadmin is still working? Something's not right there.
If phpmyadmin is still running after your problem, then the problem is most likely related to your apache config file.
If you cannot access phpmyadmin at all until restart of apache, then you effectively your apache server. However, since nothing is showing up in the error logs, I doubt it somehow.
Could you paste us the relevant parts of your apache config, tell in more detail, what urls you are using to log in, what software you are using (if that is the case, e.g. wordpress) and perhaps generally explain more what you are trying to do?
EDIT 1
If it is a PHP related error, try reading the php error log. That log is different from the apache log. Some servers never send error reports to the browser by default and only show a white page. You can find the location of the php log file in your php.ini. Just keep looking for the word log.
I ran into a similar problem.
I narrowed it down to pages that interfaced with the database seemed to result in this message from Apache.
In my case, Oracle had been upgraded to 11g and caused the OCI connections to fail. No PHP or Apache errors were returned which made it rather difficult to come to this conclusion...
Changing the following in the php.ini (and an apache restart) solved the issue.
;extension=php_oci8.dll ; Use with Oracle 10gR2 Instant Client
extension=php_oci8_11g.dll ; Use with Oracle 11gR2 Instant Client

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