as the message above says, make sure there is NOTHING in your script before the session_start() call, also, are you using windows? if you are, you're gonna have to use a windows fix, have a look at the following code, this goes at the very top of one of my pages, no gaps, no white space, no HTML, not even one space before the <?php.........
<?php
session_start();
header("Cache-control: private");// IE 6 fix
$session['adminusername'] = $POST['adminusername'];
$session['Password'] = $POST['Password'];
if((!isset($session['adminusername']) ||(!$session['Password']))){
header("Location: accessdenied.php");
exit;
}?>
notice the header("Cache-control: private");
this is a fix for windows and is internet explorer specific.
hope this helps you 😮)