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.
Is there a minimal php5ts.dll out there? Or can I build it from the source code without too much work?
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:
(found here: Compiling PHP with no extra weight via Googling for "UPX php5ts.dll" )And yes, it suits StackOverflow better :) Cheers!