The "simple" solution is to use an output buffer, which, was probably enabled by default in the version of PHP you were running on XP. That aside, there is no reason why, provided the scripts are written properly that you should need to send a cookie after you have started page output.
A tool such as a counter is easily implemented in this way and setting a global or template variable is all that is required to display the information in the later output. So my suggestion is, instead of taking the simple solution of putting ob_start(); at the beginning of every page, you rework your script so it follows best practice.
P.s: there is no hidden abilities in XP / Apache that prevent or allow the sending of cookies after output has started as cookies are sent within the header using the Set-Cookie field. An HTTP response / request is formatted (see below) in such a way that the headers come before the body; headers by definition and as stated in RFC 2616 cannot be sent to the client once you have started sending the body. Output buffering simply causes PHP to hold all the output until the script has finished; once again however, a properly written script should only ever need an output buffer for performance enhancing reasons.
Code:HTTP/1.1 200 OK Cache-Control: private, max-age=0 Date: Tue, 05 Aug 2008 07:26:29 GMT Expires: -1 Content-Type: text/html; charset=UTF-8 Set-Cookie: PREF=ID=10fa357da548a300:TM=1217921189:LM=1217921189:S=GWyPvAxJ5_2LsyHl; expires=Thu, 05-Aug-2010 07:26:29 GMT; path=/; domain=.google.fr Content-Encoding: gzip Server: gws Content-Length: 2743 <html> <head> ....




Reply With Quote