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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: fupay at lycos dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Wed Mar 12 11:01:32 2025 UTC