Previous Thread
Next Thread
Print Thread
Rate Thread
#103139 09/16/2001 5:45 PM
Joined: Oct 2000
Posts: 743
Moderator / Code Fixer
Moderator / Code Fixer
Offline
Joined: Oct 2000
Posts: 743
How can I check if a file has been locked by another process in my script? Because its a cgi script and can be used my multiple users, hence causing a problem with the file it writed to. Im not very familiar with file locking so any help would be appreciated.

Just after I open the file in question I use
flock(FILE, LOCK_EX);
and after I close it I use
flock(FILE, LOCK_UN);

But using the above still causes problems with the data file.

Thanks


I can't afford a good signature editor frown
Sponsored Links
Entire Thread
Subject Posted By Posted
File Locking BassTeQ 09/17/2001 12:45 AM
Re: File Locking LK 09/17/2001 12:52 AM
Re: File Locking BassTeQ 09/17/2001 2:24 AM
Re: File Locking BassTeQ 09/18/2001 12:56 AM
Re: File Locking Mark Badolato 09/18/2001 3:23 AM
Re: File Locking BassTeQ 09/18/2001 7:38 AM
Re: File Locking qasic 09/18/2001 5:13 PM
Re: File Locking Greg Hard 09/19/2001 1:30 AM
Re: File Locking Greg Hard 09/19/2001 1:34 AM
Re: File Locking Burak 09/19/2001 2:13 PM
Re: File Locking BassTeQ 09/21/2001 11:20 AM
Re: File Locking qasic 09/21/2001 5:11 PM
Re: File Locking BassTeQ 09/24/2001 1:14 PM

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Shock Hosting
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
AllenAyres
AllenAyres
Texas
Posts: 21,080
Joined: March 2000
Forum Statistics
Forums63
Topics37,583
Posts293,955
Members13,824
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 696
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 23
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260108)