I'm definitely having a 'should have just stayed in bed' day.
The information I omitted was that I am running this on a localhost server.
It's Windows 7 and I use cr/lf.
It seems strange to me that as there have been no changes at all to any aspect of the code and it works in perfectly in CS4 but not CS6.
Also it worked in CS6 prior to the latest update a few days ago.
Maybe I should take up road sweeping instead