In the first post, you mentionned that these problems started happening when users were accessing specific pages. Can you track down which pages they are, as it may give a clue as to anything in those pages that is causing the problem.
The $CFG->debug line is not documented (except in the forums ).
Although for some php 5.1.4 is fine on Windows, it may be a good idea to be prudent and take Dan's advice re php and upgrade to php 5.1.2 also. Doing a manual install is not difficult. This guide by Steve Henderson is good - just set aside 1-2 hours without interruptions!