Session active and start may behave differently depending on version of PHP. 

Avoid session already active warnings by using PHP functions rather than globals.

Resolves issue #835