What are common issues with using Sessions in PHP and how can they be mitigated?

Issue: One common issue with using Sessions in PHP is that they can be vulnerable to session hijacking if not properly secured. To mitigate this, it is important to regenerate the session ID after a user logs in or changes privilege levels.

session_start();

// Regenerate session ID
session_regenerate_id(true);