session.auto_start
If you’re using sessions on every page and your code structure makes it tedious to ensure session_start() is being called at the proper time, this ini setting might be of interest to you.
Set session.auto_start to “On” and each request will automatically start a session for you. No more need for session_start()!
Of course, if there are things you need to do before starting a session, this setting won’t work out for you. We’ll look at some of those things starting tomorrow.
See the manual entry for session.auto_start
