1

I have developed systems using php for few years. Therefore I know about $_SESSION , browser session well. But I need to know can I create a Session on web site hosted apache server from a php call and access that session from different PCs ?

Here are the example scenario:-

My web site is abc.com (assumption). There are two users from two different PCs. User A click on a button on my app can that button click call should create session (not a browser/user session but server session) in web server and User B should be able to access it.

I know there is a trick by save in a db and read it from user B. But I need to know another way because db read is time consuming. Is there a way ? Thanks

Aniket Sahrawat
  • 12,410
  • 3
  • 41
  • 67
  • There are no good answers, but here's [basically the same question](http://stackoverflow.com/q/994935/4233593). You want to manage a shared session through a load balancer. – Jeff Puckett Nov 04 '16 at 02:57
  • This is quite simple to do by changing the way session data is stored. By default PHP uses files to store the session data, and in php.ini you will see session.save_handler = files. You can change this to session.save_handler = database, or session.save_handler = sqlite. If your needs are humble, go with the built in sqlite, https://www.phpro.org/tutorials/Introduction-To-PHP-Sessions.html#12 – Kevin Waterson Nov 04 '16 at 03:39

0 Answers0