symfony/symfony — pull request #4255 by drak (2012-05-11 06:39:27+00:00)
Title: [HttpFoundation] Trap fatal configuration condition.

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT

It seems three is an unexpected behaviour in PHP - but basically the ini directive `session.auto_start` actually starts a session the instant PHP initialises as opposed to "on-demand" when PHP actually needs a session.

This means two things:

1. There is no point in setting this ini directive in userland since if it's set to `1` the session will have already started, and if it was `0`, then setting it to `1` will have zero effect.

2. To use Symfony2 sessions, we require to start the session ourselves, so if the directive is set to `1` we cannot use the session.

It seems like this runtime exception is wise. Fortunately, the default in `php.ini` is for `auto_start = 0`.