What is the common error message encountered when trying to use header(Location) after starting a session in PHP?

When trying to use `header(Location)` after starting a session in PHP, the common error message encountered is "Cannot modify header information - headers already sent". This error occurs because headers must be sent before any output is sent to the browser, and starting a session sends headers. To solve this issue, you can use output buffering to buffer the output before starting the session.

<?php
ob_start(); // Start output buffering

session_start(); // Start the session

// Your code here

header("Location: example.php"); // Redirect to example.php

ob_end_flush(); // Flush the output buffer
?>