I would check if session_start() returns true (session started), for example:
$is_session_started = session_start();
If $is_session_started == false , then you have 1/2 the answer to it. The other 1/2 will lie in figuring out why it doesn't start. Per @Ryan above, check your session settings.
If you use cookies to store the session ID, make sure you call session_start() before printing / echoing / returning any other values ββto the browser.
source share