What are common issues that can arise when starting sessions in PHP?

One common issue that can arise when starting sessions in PHP is the "headers already sent" error. This occurs when there is any output (such as whitespace) before the session_start() function is called. To solve this, make sure to call session_start() at the very beginning of your PHP script, before any HTML or whitespace.

<?php
session_start();
// rest of your PHP code here
?>