php - symfony2 how to store session differently on one domain/IP with to different application -


i have 2 different projects in symfony2. using symfony2.3 version.

i have used fosuserbundle user authentication.

i have 1 server. have uploaded both projects at

  1. /var/www/html/project1
  2. /var/www/html/project2

and accessing 2 applications/projects

  1. http://202.12.0.0/project1 ,
  2. http://202.12.0.0//project2.

(ip here given example. it's not ip using).

my problem when login in http://202.12.0.0/project1 store session taking http://202.12.0.0 domain.

so when login in http://202.12.0.0/project2, logout http://202.12.0.0/project1. need login again.

and v/s same project2.

i have no other option that. mean have no option virtual host 2 different project. have lan, , every 1 using project/my-application using ipaddress/project.

i referred session in different applications symfony2 doesn't me.

you should configure both projects use different place session files stored.

in symfony2 can save_path param in framework configuration

more info: http://symfony.com/doc/current/cookbook/session/sessions_directory.html

also can done strictly in php session_save_path function.

edit. changing session name work too. can either framework configuration or session_name php function.


Comments