So my app is making different database calls and retrieving data that I don’t want to pass to the client side.
I also don’t want to go to the database and retrieve any information more than once.
Hence I want to store some of that retrieved information purely on the server side.
Am I right in saying I should use $_SESSION variables on the server side for this?
When I see @George and @Teodor saying:
Can you please clarify for me what “while the PHP user session is active” actually means in reality?
Is it:
- Is it from when the user visits the page to when the tab on the browser is closed?
- Is it from when the user visits the page to a security logout?
- Is it from when there is a security login to a security logout?
- Is it time limited in some way?
So I’ve started reading around articles like this one.… and it seems like:
- A “session” gets stopped and started and session variables can then be created within that session time window.
- A session by default can be started as the page is visited by setting
session.auto_start = 1
in thephp.ini
file.
- So assuming for now that
session.auto_start
is set to 0, does the Security Provider Login action start a Session? Or does page load start it in how Wappler is set up?
Also…
6. What happens to the session data if the user hits refresh on the browser? Are all the values cleared or do I need to clear them if that is what I want?
7. Is there any limit on the quantity of data that can be stored in total?
8. Is there any limit on the quantity of data that can be stored in one variable?
But then…
9. What is the difference betwen a $_SESSION and a $_SERVER variable?
And finally, …
10. If I am running in an auto-scaled environment like AWS offers, then I presume that once a user session is started then all requests for that session will be routed to the same ec2 server instance where the correct session variables can be found…
Any clarity would be greatly appreciated!
Many thanks,
Antony.
Last updated: