headers already sent means that there is output to the page
the error is reporting the outpout at line 1:
Often times when the error is reported at line 1, it is because the unicode signatureBOM is applied to the page.
Go to Modify Page properties.
In the title and encoding Section, make sure the Include Unicode Signature (BOM) is Not checked.
if you still have a problem, look for a blank line or space in the page outside the php tags at line 1.