Check if session is really active

If you started and stopped a PHP session then session_id won't be empty (but session is closed). If you use session_status you can get the real state of a PHP session.