Try running the following PHP script.
<?php echo 'browser output'; session_start(); ?>
You will either see normal output or get the following error messages.
This is because when you try to start the session it adds items to the headers outputted by the browser, including the setting up of cookies. To stop this happening you need to ensure that the session_start() function call is put before any output from the browser. This is the case for all header modifying functions including set_cookie() and header().