"Headers Already Sent" errors usually mean you have blank lines of code in your php. Php doesn't like blank lines or spaces in the code above the <html> tag. Go through and make sure there aren't any empty lines and you shouldn't get that error.
It also sometimes happens that your ftp program will add extra blank lines that can cause that error. So perhaps you uploaded with a different ftp program and that fixed the issue.