If you get a PHP error ‘Warning: Cannot modify header information – headers already sent by‘ it’s normally down to whitespace before or after the PHP start or stop tags. For example a gap before <?phpwill do it…
If in my case, I’ve just put a ‘tried and tested’ script onto a different server, and it was working fine on the last server, but getting the message on the new one…
Note the first word ‘Warning:‘…. This is not a PHP error in the way you’ll have seen other ones, as the ‘Warnings’ can be turned off in the server settings… In my case, the shared hosting account must have had the ‘Warnings’ turned off, so the error has always been there, I just didn’t know it… and the new server has the ‘Warnings’ turned on….
After a short search, there it is, a little bit of whitespace after the ending ?> tag…
Don’t you just love technology!?!?!