Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

In the weekend I upgraded my development web server to Apache 2.4 and PHP 5.4. In my web application which was previously working great on Apache 2.2 and PHP 5.3 it now starts getting these messages saying the "connection was reset" in Firefox. See screenshot. I am connecting to the linux machine via local LAN.

I'm assuming it might be something to do with the new version of Apache or PHP, or the new LAMP stack which I downloaded from BitNami? It would seem to happen every 5-10 requests and throw this error, perhaps more likely to trigger it is if I send a POST request from a page. Is it timing out the script or something? These are just basic dynamic pages I'm loading and they worked perfectly in Apache 2.2 and PHP5.3.

Here are my httpd.conf and PHP.ini if that has any clues.

Any ideas? Any help much appreciated.

share|improve this question
1  
Have a look in your Apache error log and your PHP error log (if it's separate) and let us know what you find. –  Ladadadada Mar 13 '12 at 8:47
    
Nothing in either since Saturday which is when I installed it. The error occurred as recent as half an hour ago but nothing related to it in there. –  zuallauz Mar 13 '12 at 9:01
1  
Sounds like you're looking in the wrong log files. The easiest way to determine which files Apache is using is to ls -l /proc/<some apache pid>/fd –  Ladadadada Mar 13 '12 at 9:06
    
Doh I can't even get a process id for long enough to run that command. When I load up a webpage it fires up the apache process then disappears again as soon as it's loaded. –  zuallauz Mar 13 '12 at 9:20
1  
That's odd. However, we can work with it. There must be at least one Apache process owned by root. Try strace -f -p <apache root pid> -e trace=open -s 400 –  Ladadadada Mar 13 '12 at 9:39

3 Answers 3

up vote 2 down vote accepted

After the discussion, this sounds like you may have the wrong version of LAMPStack (maybe the 64 bit version instead of the 32 bit version) or possibly a different version of some library that LAMPStack was built against or maybe you have just discovered a bug in LAMPStack. It will be difficult to tell exactly what it is via a Q&A site such as this.

Judging by the name on the download page "LAMPStack 5.4.0-0 dev" it looks like this is the development version of LAMPStack. This generally means that it may have bugs in it and should not be used in production. It is probably also not good for a development machine as you usually want that to be quite similar to your production setup. Their blog post announcing the new version mentions this. They also suggest using their forum to ask any questions you have about it and that is where I would suggest you take these SegFaults now if you plan to continue using the new version.

If you just want to get back to developing your app, I would suggest downgrading back to LAMPStack 5.3.10-1.

share|improve this answer
    
Yeah good advice. Think I'll have to downgrade and work with a more stable version. At least I know my app runs on 5.4 apart from this issue. In production do people really use pre-built LAMP stacks? I was considering installing all the components separately and just use a LAMP installer for development because it's easier and faster. –  zuallauz Mar 14 '12 at 20:07
1  
I'm from the BitNami team. I just wanted to add that we use the dev tag for the BitNami LAMPStack 5.4 just because it packs Apache 2.4 and PHP 5.4 and most applications have not been tested yet with these versions of those components. –  kaysa Apr 12 '12 at 8:53

Interesting

I have just upgraded from Apache 2.2.19/PHP 5.2.5 using VC6 windows x64 bit binaries to Apache 2.4/PHP 5.4.0 using VC9 x64 bit binaries and ran into the same problem. I installed Apache as a service. When I removed Apache as a service and started it from the command line this problem went away.

share|improve this answer
    
The question was about a Linux Setup. Services are windows specific. –  Thomas Berger Oct 12 '12 at 19:29
    
@ThomasBerger: Services is a generic word that Microsoft just used as their naming convention, but it still has technical merit in die Linuxes. For example, in RedHat one uses /sbin/service to interact with the SysV init scripts. –  Scott Pack Oct 14 '12 at 0:58
    
@ScottPack A service could be implemented on several ways. I'm not sure which way apache is working as service. Under *nix there is no difference between starting the Apache by hand, and using the SysV script. –  Thomas Berger Oct 15 '12 at 9:49

I just had a similar problem with Apache 2.2 and PHP 5.4 on an OpenSUSE local system. Most requests worked as expected, but (some) POST requests were immediately and always answered with a "connection was reset" error. No entry in the error log nor in the access log. This was browser independent.

Solution

I downgraded PHP to version 5.3 and restarted the Apache, but nothing changed. But after a complete system reboot, everything worked well.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.