Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FLOCK on webhost's server not working consistenly - what else to use?

Status
Not open for further replies.

WAHMom

Programmer
Dec 11, 2002
30
US
We are running a data retrieval program which allows users to append to a file. I programmed the cgi script to to use FLOCK (see at bottom) but our web host tells me that flock is running over network file server sharing files among various users so FLOCK sometimes fails.

We are in a critical situation right now with data being lost from our clients because of this and I am desperate for an alternative file locking method.

Any advice?

Here is a snip of our cgi script utilizing FLOCK:
open(FILE, ">>/var/tilt/zzzzz/private/web.txt");
> flock(FILE,2);
> seek(FILE,0,2);
> print FILE "SUB CODE:";print FILE "$contents{'SUBCODE'}";
> <etc etc etc>
> print FILE &quot;Info submitted &quot;;
> print FILE &quot;$date\n&quot;;
> print FILE &quot; --- &quot;;
> close (FILE);
> exit;
 
Find a more reliable web host?

There's always a better way. The fun is trying to find it!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top