views:

160

answers:

2

I've completed my web app and am using mongoose to serve the php pages. The whole app & mongoose is less then 2MB.

The php5ts.dll is almost 5MB so that really adds bloat. Also, my app is very minimal so I don't need many of the php features, ie. mysql & crypto.

I've used UPX to compress it down to 1.7MB, however thats the same I was getting before using 7zip so its not a big deal. I've read on winbider forums that some people recompiled it and made it even smaller. Would anyone know where I could find these minimal php5ts.dll?

A: 

You can compile your own version. The source is publicly available, and this way you can include exactly the features you want.

Read about compiling on windows here.

gnud
I've never had good luck compliling anything from source, so I was trying to avoid that.
shaiss
+1  A: 

Sure you can recompile. Use './configure' keys (or how is it in windows, maybe, Makefile?) to add/remove functionality you need, consult the manual for the exact module directives for sets of functions.

You may Google for a pre-compiled library, but it's always better to recompile it so it meets your needs, shrinks in size and overall - fits better ;)

Also consider using packers like UPX:

php5ts.dll: 1290 kB (62% compression)
(found here: Compiling PHP with no extra weight via Googling for "UPX php5ts.dll" )

P.S. If you had read answers on ServerFault, you would have known this ;)

o_O Tync