Symfony 2.1 Session Local Value and Master Value (read on phpinfo)


I'm having problems with sessions when i sarted migration from symfony 2.0 to symfony 2.1.

I'm using simplesamlphp for authentication and everything was working ok on symfony 2.0.

On Symfony 2.1 it is NOT OK. I checked the diferences between them on phpinfo->session and this what i got:

symfony2.1 symfony 2.0 Master Value session.save_handler user files files session.save_path (..)/symproject/app (..)/wamp/tmp (..)/wamp/tmp /cache/dev/sessions

This values must be equal to php.ini since simplesaml requires it!

I could set the framework:session:save_path property on config.yml but i think this is not a good practice since save path might be diferent depending if im on my local development machine or not (i have my project on git).

And about save_handler i could not find a waay to specify it on config.yml. Am i stick with "user" on this?

What is happening in this symfony version?? In symfony 2.0 this was out of box! Please help. There is no decent documentation on this (believe me i've looked!!).


Finally i've got it!

Symfony 2.1 had the Native* drivers by default. And this overrides configurations existing on php.ini.

If you want to use php-ini configs you must pass null to the NativeSessionStorage constructor for the handler arg.

This is done by putting the following configurations on config.yml:

framework: session: handler_id: ~

More information on this decision can be read <a href="https://github.com/symfony/symfony/pull/5267" rel="nofollow">here</a>.

This information is missing from symfony docuymentation and upgrade manual.


  • Saving PHP session variables using multiple memcache servers
  • wicked_pdf not loading header or footer in ActionMailer
  • how can i reference $_SERVER['DOCUMENT_ROOT'] in a .htaccess file?
  • file_get_contents with https requests via proxy
  • Issue with session.handler.native_file session handler in symfony2
  • Cythonized function unexpectedly slow
  • Passing parameter through “window.location.href”
  • Iterate twice through a DataReader
  • Universal Image Loader reuse images
  • PushKit for VOIP iOS apps
  • HttpClient: disabling chunked encoding
  • Magento site down due to mysql error General error: 1030 Got error -1 from storage engine
  • Getting media player state in windows phone 7
  • Lock Horizontal View
  • Clear fused location provider's location for testing
  • Is there a way to save the selected text and highlight it again once the page is refreshed?
  • perl, mysql - fasting way to upload a csv file into mysql?
  • Debugging VB6 Code From Visual Studio 2010
  • Build Successful but not running on simulator
  • android.support.v7.widget.Toolbar VectorDrawableCompat IllegalStateException when using support lib
  • Button text different than value submitted in query string
  • Get history of file changes from TFS to implement custom “blame”-behaviour of exceptions
  • Installing iPhone App to iPhone
  • PHP buffered output depending on server setting?
  • iOS: Detect app start via notification press
  • Meteor helpers not available in Angular template
  • Exception “firebase.functions() takes … no argument …” when specifying a region for a Cloud Function
  • Paperclip, set path outside of rails root folder
  • Installing Hadoop, Java Exception about illegal characters at index 7?
  • Is calc() supported in html email?
  • req.body is undefined - nodejs
  • Shallow update not allowed (git > 1.9)
  • Symfony2: How to get request parameter
  • Convert array of 8 bytes to signed long in C++
  • Akka Routing: Reply's send to router ends up as dead letters
  • Arrays break string types in Julia
  • Is there a mandatory requirement to switch app.yaml?
  • Understanding cpu registers
  • Recursive/Hierarchical Query Using Postgres
  • Running Map reduces the dimensions of the matrices