3
When editing mainfile.php (or any PHP file) make sure the editor doesn't leave any blank space after the closing PHP tag. Common issue, but can cause endless problems.
Also, try to upload PHP files in ASCII mode. This automatically converts line feed characters in the file to the correct format for the target server OS. To be honest, most servers aren't that fussy, but in my experience this has caused problems with some scripts.
A thread is for life. Not just for Christmas.