Re: PHP header location not working on X10hosting
The reason why WAMP doesn't throw the error is because output buffering is enabled by default in the php.ini. You don't have access to the php.ini here (or in most shared hosting environments), but you can modify your scripts to include output buffering by adding the lines:
PHP Code:
<?php
ob_start();
//everything else goes here
ob_end_flush();
?>
to all of your "host" pages (not the included or required pages). That is not the optimal solution though -- it would be far better to turn off output buffering in your local php.ini. That will cause the "headers already sent" error to happen in your WAMP development/testing environment, which will then force you to write your scripts in a way that is easily deployable to any host.
“Beware of bugs in the above code; I have only proved it correct, not tried it.” --Donald Knuth
"It was as if its architects were given a perfectly good hammer and gleefully replied, 'neat! With this hammer, we can build a tool that can pound in nails.'" -- Alex Papadimoulis (on TheDailyWTF.com)