php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #13226 Add a session_lock function
Submitted: 2001-09-10 05:52 UTC Modified: 2002-01-28 21:15 UTC
From: fupay at lycos dot com Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4.0.6 OS: Linux
Private report: No CVE-ID: None
 [2001-09-10 05:52 UTC] fupay at lycos dot com
Some problem occurs if I want the database can only one user can use the database at time. For others, keep them in a query. The go one by one.

The Problem - Example:

I want to limit the registation, max 50 people.
There is a problem in checking the number of people registered, if there are many people click the submit button at the same time.
Therefore, use session_lock()(can change the name, just example) function the block the user, and let them the process the code one by one.
Maybe also need a session_unlock(), to unlock.

It is just like the Applicaion.lock() and Application.unlock() in ASP




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-01-28 21:15 UTC] yohgaki@php.net
You can do it with database that supports transaction. 
Or use semaphore.

With multiple web servers, it does work well also.

Won't change.....
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Feb 29 19:01:30 2024 UTC