You need to call session_start before ANYTHING has been output to the browser. If you have any echo statements before your session_start call it's not going to work. Also, if you have an empty line or some spaces before your opening <? tag then that would also cause the problem.
Looks to me like line 4 outputs something.