Newbie: rails3 session & access via php

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 kC: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

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 [email protected] wrote:

@hash{;T ) 1

To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
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

u mean no two? and then pass the sessionid via url?
thx

On Sun, Sep 11, 2011 at 7:51 PM, Zolzaya Erdenebaatar

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 view

any ideas?
thx

---------- Forwarded message ----------
From: tom [email protected]
Date: Mon, Sep 12, 2011 at 3:30 AM
Subject: Re: [Rails] newbie: rails3 session & access via php
To: [email protected]

u mean no two? and then pass the sessionid via url?
thx

On Sun, Sep 11, 2011 at 7:51 PM, Zolzaya Erdenebaatar