Hey there everyone
Does anyone have any experience on this and if so could you please
guide me in the right direction?
I have a rails app which is password protected using acts as
I want to use php for the uploads section of the app for the following
- Php does not have problems with blocking like rails on file uploads
- Php/imagemagick is way less processor intensive than rails/rmagick
- I m potentially going to uploading video and processing with ffmpeg
and for the two reasons above php would probably be more sensible.
I want to be able to check if a user is logged from within my php app
and this is how i am proposing to do it
- Log in via rails site, browse to image page
- grab the session id from rails and the user id and pass them to the
php upload script. i am assuming rails will write a unique session
identifyer file to /tmp ? or the same in the database
for example the url for the php script might look something like this:
- from the php script check to see the user exists and the session
exists for this user and do the image upload/processing
- redirect to the rails page
when the user logs out/session expires obviously the php would throw
an error and not work because the session would be deleted
Does anyone hae any experience with sharing sessions between rails and
Is there any librarys for such?
what would be a more secure way of doing this?