hi, im having a working rails3 app with devise. on the subdomain (same server) i have a phpscript which i need to use. i do currently use cookie stores. when im not logged into rails, then the output of my php script looks like this: Array ( [0] => {"_csrf_token"1dbm4TrxUPTLaNA39YtIu92pPoDiNy6pRIrhmwjOYYg0="session_id"%0e4d83ea31b16dd4e2c164671961c073"user_return_to"/home" [flashIC:%ActionDispatch::Flash::FlashHash{] => [alert"6You need to sign in or sign up before continuing.] => [@usedo:Set] => [1] => @hash{;T ) 1 being logged in, it looks like that: Array ( [0] => { ["_csrf_token"1dbm4TrxUPTLaNA39YtIu92pPoDiNy6pRIrhmwjOYYg0="session_id"%a1220894b4372e1656768900657e9bdc"warden.user.user.key[" User[i""$2a$10$zDfB1jyHfLOa1LzzkgDLYe"warden.user.user.session{"last_request_atIu] => Time ká€ØC©:marshal_with_utc_coercionT" [flashIC:%ActionDispatch::Flash::FlashHash{:notice"Signed in successfully.] => [@usedo:Set] => [1] => @hash{;T ) 1 now i guess my question is: 1) how can i associate a user with the phpinformation about the session? (how does rails do it? 2) should i go with active-record-session-store and add the user_id there? thx -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I think yes. You should store your session to database and access it via php. On Sun, Sep 11, 2011 at 7:52 PM, tom <tomabroad-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> hi, > im having a working rails3 app with devise. on the subdomain (same > server) i have a phpscript which i need to use. i do currently use > cookie stores. > when im not logged into rails, then the output of my php script looks like > this: > Array ( [0] => > {"_csrf_token"1dbm4TrxUPTLaNA39YtIu92pPoDiNy6pRIrhmwjOYYg0="session_id"%0e4d83ea31b16dd4e2c164671961c073"user_return_to"/home" > [flashIC:%ActionDispatch::Flash::FlashHash{] => [alert"6You need to > sign in or sign up before continuing.] => [@usedo:Set] => [1] => > @hash{;T ) 1 > > being logged in, it looks like that: > Array ( [0] => { > > ["_csrf_token"1dbm4TrxUPTLaNA39YtIu92pPoDiNy6pRIrhmwjOYYg0="session_id"%a1220894b4372e1656768900657e9bdc"warden.user.user.key[" > > User[i""$2a$10$zDfB1jyHfLOa1LzzkgDLYe"warden.user.user.session{"last_request_atIu] > => Time ká€ØC©:marshal_with_utc_coercionT" > [flashIC:%ActionDispatch::Flash::FlashHash{:notice"Signed in > successfully.] => [@usedo:Set] => [1] => @hash{;T ) 1 > > now i guess my question is: > 1) how can i associate a user with the phpinformation about the > session? (how does rails do it? > 2) should i go with active-record-session-store and add the user_id there? > > thx > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- Best wishes, Zolzaya E. - Developer "USI" LLC Building of Enkhuud center, 4th khoroo, 15th khoroolol Bayanzurkh district, Ulaanbaatar - 51, Mongolia Mobile: (976) 88001963 Phone: (976) 70151145 Fax: (976) 70141146 -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
u mean no two? and then pass the sessionid via url? thx On Sun, Sep 11, 2011 at 7:51 PM, Zolzaya Erdenebaatar <zolzaya.erdenebaatar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I think yes. You should store your session to database and access it via > php. > > On Sun, Sep 11, 2011 at 7:52 PM, tom <tomabroad-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >> hi, >> im having a working rails3 app with devise. on the subdomain (same >> server) i have a phpscript which i need to use. i do currently use >> cookie stores. >> when im not logged into rails, then the output of my php script looks like >> this: >> Array ( [0] => >> {"_csrf_token"1dbm4TrxUPTLaNA39YtIu92pPoDiNy6pRIrhmwjOYYg0="session_id"%0e4d83ea31b16dd4e2c164671961c073"user_return_to"/home" >> [flashIC:%ActionDispatch::Flash::FlashHash{] => [alert"6You need to >> sign in or sign up before continuing.] => [@usedo:Set] => [1] => >> @hash{;T ) 1 >> >> being logged in, it looks like that: >> Array ( [0] => { >> >> ["_csrf_token"1dbm4TrxUPTLaNA39YtIu92pPoDiNy6pRIrhmwjOYYg0="session_id"%a1220894b4372e1656768900657e9bdc"warden.user.user.key[" >> >> User[i""$2a$10$zDfB1jyHfLOa1LzzkgDLYe"warden.user.user.session{"last_request_atIu] >> => Time ká€ØC©:marshal_with_utc_coercionT" >> [flashIC:%ActionDispatch::Flash::FlashHash{:notice"Signed in >> successfully.] => [@usedo:Set] => [1] => @hash{;T ) 1 >> >> now i guess my question is: >> 1) how can i associate a user with the phpinformation about the >> session? (how does rails do it? >> 2) should i go with active-record-session-store and add the user_id there? >> >> thx >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Talk" group. >> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> > > > > -- > Best wishes, > Zolzaya E. - Developer > > "USI" LLC > Building of Enkhuud center, 4th khoroo, 15th khoroolol > Bayanzurkh district, Ulaanbaatar - 51, Mongolia > > Mobile: (976) 88001963 > Phone: (976) 70151145 > Fax: (976) 70141146 > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
hi, i switched to activerecord store and im using devise. def after_sign_in_path_for(resource) puts "...............................................after_sign_in_path_for" puts request.session_options[:id].to_s>> i get no session information, althought the code works fine in the viewany ideas? thx ---------- Forwarded message ---------- From: tom <tomabroad-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Date: Mon, Sep 12, 2011 at 3:30 AM Subject: Re: [Rails] newbie: rails3 session & access via php To: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org u mean no two? and then pass the sessionid via url? thx On Sun, Sep 11, 2011 at 7:51 PM, Zolzaya Erdenebaatar <zolzaya.erdenebaatar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I think yes. You should store your session to database and access it via > php. > > On Sun, Sep 11, 2011 at 7:52 PM, tom <tomabroad-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >> hi, >> im having a working rails3 app with devise. on the subdomain (same >> server) i have a phpscript which i need to use. i do currently use >> cookie stores. >> when im not logged into rails, then the output of my php script looks like >> this: >> Array ( [0] => >> {"_csrf_token"1dbm4TrxUPTLaNA39YtIu92pPoDiNy6pRIrhmwjOYYg0="session_id"%0e4d83ea31b16dd4e2c164671961c073"user_return_to"/home" >> [flashIC:%ActionDispatch::Flash::FlashHash{] => [alert"6You need to >> sign in or sign up before continuing.] => [@usedo:Set] => [1] => >> @hash{;T ) 1 >> >> being logged in, it looks like that: >> Array ( [0] => { >> >> ["_csrf_token"1dbm4TrxUPTLaNA39YtIu92pPoDiNy6pRIrhmwjOYYg0="session_id"%a1220894b4372e1656768900657e9bdc"warden.user.user.key[" >> >> User[i""$2a$10$zDfB1jyHfLOa1LzzkgDLYe"warden.user.user.session{"last_request_atIu] >> => Time ká€ØC©:marshal_with_utc_coercionT" >> [flashIC:%ActionDispatch::Flash::FlashHash{:notice"Signed in >> successfully.] => [@usedo:Set] => [1] => @hash{;T ) 1 >> >> now i guess my question is: >> 1) how can i associate a user with the phpinformation about the >> session? (how does rails do it? >> 2) should i go with active-record-session-store and add the user_id there? >> >> thx >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Talk" group. >> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> > > > > -- > Best wishes, > Zolzaya E. - Developer > > "USI" LLC > Building of Enkhuud center, 4th khoroo, 15th khoroolol > Bayanzurkh district, Ulaanbaatar - 51, Mongolia > > Mobile: (976) 88001963 > Phone: (976) 70151145 > Fax: (976) 70141146 > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.