tags:

views:

1882

answers:

10

I'm looking for a small (not more, than a few megs) web server, which must be capable of running PHP code (with external PHP installation). I would strongly prefer one where it is very easy to change the root directory often. My OS is Windows XP.

I saw these related SO questions:

XAMPP, however, is huge (I just installed it, its more than 200 Mb!); thttpd and lighttpd does not support PHP, others are even worse than those.

Right now I'm using Technologica HTTP Server, which is almost perfect, but unfortunately it is rather slow when serving PHP pages, since it starts a new instance of php.exe for each page request. What's worse, about every second time the PHP interpreter somehow locks up and times out after 10-15 seconds, making the whole thing even slower.

Are there any alternatives that I have missed?

Edit: LightTPD might be just it. It does support PHP after all.

Edit 2: Thanks for everyone's answers, they have been really helpful! I chose MicroApache because that's the smallest which satisfies all my requirements.

+1  A: 

Check out MoWES.

MoWeS stands for the three letter abbreviation Modular Webserver System and makes it possible, to run a webserver based on Apache, MySQL and PHP from an USB Stick or any other writable media (harddrive, flash cards etc.) without installation under Windows (98 to Vista).

Syntax
+5  A: 

I've never done this so I could be wrong, but apparently lighttpd does support PHP: Setting up PHP with Lighttpd

roryf
Thanks, I wasn't aware of that. LightTTPD is still almost 10 megs, but that's a still lot better than XAMPP.
David Hanak
I don't think you're going to get much smaller than that.
ryeguy
+5  A: 

Well, a basic apache installation isn't all that big and takes very little resources. My current installation is about 40Mb (obviously way over your 2Mb limit), but 10Mb of that is docs and there is a load of other stuff that most installations won't need.

Can you be more specific about why you have a 2Mb limit on the web server?

rikh
When I wrote a couple, I didn't mean exactly 2, just "a few" (see my edit). There's no specific, reason, I just want to keep it small, that's all.
David Hanak
Apache is the de-facto default webserver for PHP, so you would really do your self a favour by going with that. Just slim it down a bit (Remove docs and unused modules)
troelskn
A: 

There is an OS project called MoWeS Portable, then there is Server2Go and I also found MiniServX, but that costs about $30.

Treb
A: 

For small and fast, you can't really beat Lighttpd. It's a really nice, fast server. The configuration is also very simple, plus with FastCGI you're able to run lots of other CGI scripts with little/no configuration.

Alex

Alex Fort
+1  A: 

This seems like more of a test server...but it is 500K in size...

Jason Punyon
Seems promising, I'll take a closer look.
David Hanak
(After a little testing) Not bad at all. Unfortunately it does not serve XML files (it simply times out), which is another must for me. Also, the licensing is not very permitting.
David Hanak
+1  A: 

Abyss Web server is quite nice and light weight and also supports PHP.

RSlaughter
+4  A: 

What about MicroApache?

I think it's under 1Mb, and it has support for PHP.

NOTE: As rochal pointed, their website is down. I couldn't find a mirror.

Rui Vieira
Cool, I had no knowledge of this project, either!
David Hanak
@Rui Vieira - your link is dead
rochal
A: 

Since 0.7.52, nginx is an option for Windows (officially) as well. It's still a development version, but should be stable enough for, um, development.

Here's how to configure it (based on an unofficial Win32 build, but should work on the official one) for PHP.

macbirdie
+1  A: 

If you want small as well as fast then hands down you should use nginx. I built a portable server wrapper for for windows that is only 7kb which you just drop in the modules you want (php,nginx,mysql,etc...). The benefit is that you can choose which versions you want to use and you don't have to install anything.

Perfect for USB drives or slow CPU's

Xeoncross