set_time_limit(0) only change PHP internal limit, has nothing to do with any web server, including apache and LSWS. Apache is likely to have a very long connection timeout, so it works if you change set_time_limit(), it does not mean that the function really did anything to Apache.
If you want...