I'm going to guess you have a parse error somewhere, or you're sending content to the browser prior to the header() call.
Put this at the top of your script (as in, on the line directly following <?php)
ini_set('display_errors', 1);
ini_set('error_reporting', E_ALL | E_STRICT);
Then upload and try your script again. See what it prints out (if anything).