Is there a downside to session.auto_start in PHP?

14,156

If you turn on session.auto_start then the only way to put objects into your sessions is to load its class definition using auto_prepend_file in which you load the class definition else you will have to serialize() your object and unserialize() it afterwards. See.

Share:
14,156
David Jones
Author by

David Jones

Updated on June 09, 2022

Comments

  • David Jones
    David Jones almost 2 years

    I usually end up adding session_start() to the top of every page on my PHP sites (or in a header file which is in turn included on every page). I recently discovered that you can have sessions start automatically by using the following setting in php.ini:

    session.auto_start = 1

    What are the potential downsides (if any) of using this setting?