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 authenticated
I want to use php for the uploads section of the app for the following reasons:
1) Php does not have problems with blocking like rails on file uploads
2) Php/imagemagick is way less processor intensive than rails/rmagick
3) 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
1. Log in via rails site, browse to image page
2. 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:
4. from the php script check to see the user exists and the session exists for this user and do the image upload/processing
5. 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 php???
Is there any librarys for such?
what would be a more secure way of doing this?