Reputation: 5146
I am working on a project where I need to have login system with multiple users where each user will login and save form entries in a file. I have maximum 10 internal users and this project is only for internal users.
Here is the idea -
logout
link on this page. This page is called index.php
.login.php
page then he will be redirected to index.php
page which has above form.index.php
page and click save button. Once save button is clicked, data will be saved in a file as json and alert box will pop up showing data written in the file (or if there is any issue writing in file).logout
button, then it redirects back to login.php
page.Now this whole system works with multiple users where only one user is allowed to save entries in a file at a given time if multiple users are logged in.
Case 1:
Case 2:
Case 3:
userA is logged in. Do you want to take over?
. If he clicks ok
button then he should login successfully. But if he click cancel
button then he will not be able to login.Case 4:
Problem Statement
Is there something in php server which can terminate my session after a particular period of time.
Upvotes: 0
Views: 493
Reputation: 524
It depends on the server configuration or the relevant directives http://php.net/manual/en/session.configuration.php#ini.session.gc-maxlifetime in php.ini
Typically the default is 24 minutes (1440 seconds), but your webhost may have altered the default to something else.
UPDATE
as per OP new comments.
If session is stored in files give the permission 777 to storage directory in you server. If you are storing the session in database then we have to find out other alternate solution.
Upvotes: 1