lilmer Posted January 26, 2015 Share Posted January 26, 2015 Hello, we got a site running in to different servers, the other one is a sub domain that will be use as internal pages and the other one is external. As of that I need to pass session to see if a user details. Is there a another secure way to pass session data to other server without storing on the database? Quote Link to comment https://forums.phpfreaks.com/topic/294235-passing-session-in-two-different-hosting/ Share on other sites More sharing options...
Monkuar Posted January 26, 2015 Share Posted January 26, 2015 You'll have to use some type of session handler. Some options: build your own (session_set_save_handler) or use extensions that provide their own session handler, like memcached. Quote Link to comment https://forums.phpfreaks.com/topic/294235-passing-session-in-two-different-hosting/#findComment-1504218 Share on other sites More sharing options...
lilmer Posted January 26, 2015 Author Share Posted January 26, 2015 I found that it can be setup on php.ini session.cookie_domain is it safe to use? can I test it directly through my hosting without any intervention on the web site. Our site now is up and running and ha a thousand of user. Quote Link to comment https://forums.phpfreaks.com/topic/294235-passing-session-in-two-different-hosting/#findComment-1504222 Share on other sites More sharing options...
scootstah Posted January 30, 2015 Share Posted January 30, 2015 If you don't use a database, then the session data will only be stored on one server. Both servers could read the session cookie, but only one of them has the corresponding data. If you stored it in a database then both servers could access it. You could also do something like a network share, but that will probably be a lot slower. 1 Quote Link to comment https://forums.phpfreaks.com/topic/294235-passing-session-in-two-different-hosting/#findComment-1504358 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.