News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Does SMF start the session()?

Started by rcane, February 16, 2023, 07:53:33 PM

Previous topic - Next topic

rcane

I was going to experiment/learn using _session['variables'] but didn't want to throw an error by calling it twice.


Ohh, disregard.  just learned out to see.

Arantor

So, a little more information.

Yes, SMF starts the session with session_start(). $_SESSION is empty before that is invoked in every case.

If you try to start a second session while the first is active, it won't throw an error but results will be... unhelpful.

You can rely on SMF having opened the session on any SMF page including SSI, loadSession() is one of the earlier functions called.

Advertisement: