The weirdest issue with lamp+mediawiki ever experienced - php

Ok, so I have set up a installation of lamp and mediawiki on my machine with the path http://localhost/mw/. I then proceeded to install windows on a virtual machine so i could test mediawiki installation with Internet Explorer. So i set the appropriate $wgServer setting to my host IP addr which was reachable from the virtualbox client.
First i accessed http://x.x.x.x/ and got a directory listing, yay it works. right?.... NO..
I then proceeded to access http://x.x.x.x/mw/ (mediawiki path), and to my suprise, IE was just loading on recieve. Several hours went by, and still IE was loading the page... No connection timeout, no recieve timeout. just loading.. forever and ever...
When trying to investigate what was really going on here, i downloaded the cli utility cURL. and proceeded with the command: curl -v http://x.x.x.x/mw/index.php/Main_Page. I was able to retrieve the page, however the result was mind blowing!
First off, mediawiki reports that the page was rendered quite fast (as read from the recieved html source)
Served in 0.356 secs.
Curl on the other hand;
* 14542 bytes transfered in 764.580 seconds (19 bytes/sec).
This suggests to me that for some reason the path /mw/... has a very slow transfer rate. All the other sites works just fine, but not /mw/
And since i never got a connection timeout or receive timeout in IE im guessing that i'm recieving byte for byte at a very slow rate, and it does this for all the resources on the page im trying to get.
And to make things even more interesting, the host machine can access /mw/ without any problems at all. I also tried connecting with another computer on the network (not a virtual machine), and it also suffered the same issue with endless loading.
Any ideas on what is going on here?

The issue seems to be traced back to xdebug module when configured with auto connect back.
Removing xdebug.xdebug.remote_connect_back in xdebug config solved the issue.

Related

The connection to the server was reset while the page was loading on client machines but not on the server

I recently deployed a nginx/php/mysql container which came up fine but when I tried testing the installation by calling the webserver from client systems, it connects a simple php code to display phpinfo but times out after few minutes with the following message:
The connection to the server was reset while the page was loading.
I have googled similar issues but most solutions seems to clearing browser cache which I have done which didn't resolve the issue.

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!

Diagnosing "The connection to localhost was interrupted"

I've been developing a Laravel 4 site on my work machine for over a year. Today I began receiving a The connection to localhost was interrupted error whenever I attempt to access the site. At the moment I'm just trying to find applicable log files that might tell me what's failing, and would appreciate suggestions from those more versed in tracking down this kind of failure. You'll see one possible cause below, but I still need to find some error logs to have any idea how to fix it. Here are some pertinent details:
I'm running Windows 7, IIS 7.5, PHP 5.5.1, and Laravel 4.1.23.
The application is accessed via https://localhost/ephy, and IIS is configured to deliver the ephy directory over SSL.
http://localhost/ephy correctly returns a 403 error indicating that the page must be accessed over SSL.
When copies of phpinfo.php (containing just a call to phpinfo() ) are placed in both the root directory and the ephy subdirectory, http://localhost/phpinfo.php executes, while https://localhost/ephy/phpinfo.php returns the connection reset error.
The application itself is executing successfully on the production server, so the PHP code is valid.
Yesterday I installed Office 2013, uninstalled Office 2010, uninstalled Office 2013, and then reinstalled Office 2013 (in that order). I also installed 2 GB of memory, because Outlook 2013 kept hanging.
The site was accessible as of 4pm yesterday, after all of that installation activity was already over.
I've made no changes to the application or the computer configuration since 4pm.
I've restarted the computer several times.
I've checked the files in C:\inetpub\logs\LogFiles , but they don't show any error messages.
So, I know PHP is running successfully and that the issue is specific to serving the application directory itself, but that's as far as I've been able to get. Recommendations on where to find (or how to generate) logs which would indicate what's happening, or any insights into the failure itself, would be appreciated.
Ok, after finally finding the magic combination of search terms on Google (ERR_CONNECTION_RESET localhost iis 7, for those who are curious, the first term being the error message from Chrome specifically), I was able to determine that this behavior can be caused by not having the self-signed security certificate correctly bound to the site in IIS. As I said, the site had been working successfully, but with the software updates I'd done something probably got borked (maybe adding the memory changed the computer's identity such that the certificate was no longer valid? I don't know).
So, I followed the instructions at http://weblogs.asp.net/scottgu/tip-trick-enabling-ssl-on-iis7-using-self-signed-certificates (with a bit of adjustment because apparently the binding has to be done at the default site level in IIS 7.5, rather than at the individual site level), whacking and replacing the existing certificate and SSL binding in the process. The site is now working again on my box.
So, in a nutshell: if you're running SSL on localhost under IIS and you get "connection to localhost was interrupted" messages, try redoing the certificate and binding.
Man, glad that's over...

fwrite() hangs when running process through mod_php as upstream, but fine solo

I seem to be having issues with running wkhtmltopdf through a proc_open() on Ubuntu Server 12.04 with PHP 5.3.10.
What seems to happen (on several servers) when running solely with Apache is that the process is opened successfully, the data is written to and the PDF comes out of the other end of the process.
However, when running the same code through a setup with Nginx as a proxy and Apache as the upstream server, the fwrite() to stdin seems to hang/become unresponsive with anything more than approximately 1200 bytes.
The static binary version 0.10.0-rc2 seems to be working fine on its own, and can render any page it can access, so I'm not sure what's causing the issue here.
Edit: It doesn't seem to be Nginx, as I've put that in front of Apache on an AWS box and it still works.
You need to run "tail -f " and run the PHP script. You will hopefully see the error message appearing and that will guide you in the right direction.
This was the result of the Nginx server not having a specific hosts entry for the domain name it was using in the request. The request entered a loop, continually hitting the external address and redirecting to it, rather than resolving locally.

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

Categories