Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 03-03-2005, 07:09 AM   #1
Dusen
Confirmed User
 
Join Date: Aug 2002
Location: East Coast.
Posts: 2,251
PHP flock?

Based on another thread I thought I'd ask this in a new one.

Is there any way using flock to 'queue' the file writes in php? All I see is examples how to say "can't get lock" and then die.
__________________
Penis Pill Sponsor List and Reviews:
http://www.pillsponsors.com
Dusen is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-03-2005, 07:14 AM   #2
psili
Confirmed User
 
Join Date: Apr 2003
Location: Loveland, CO
Posts: 5,526
I tried a quick google on it and didn't find anything. I suspect PHP would need to have a "threaded" process, where individual threads had a "wait until ready" state on the file lock, which I don't think PHP has. If it's doable though, I'd definitively like to know.
__________________
Your post count means nothing.
psili is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-08-2005, 09:02 AM   #3
Dusen
Confirmed User
 
Join Date: Aug 2002
Location: East Coast.
Posts: 2,251
Bump this thread
__________________
Penis Pill Sponsor List and Reviews:
http://www.pillsponsors.com
Dusen is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-08-2005, 09:05 AM   #4
MickeyG
Confirmed User
 
Join Date: May 2004
Location: South Florida
Posts: 4,134
I dont know but you could try adding a sleep(1) then loop and try again
MickeyG is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-08-2005, 09:07 AM   #5
swedguy
Confirmed User
 
Industry Role:
Join Date: Jan 2002
Posts: 7,981
Yeah put the lock in a while loop
swedguy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-08-2005, 09:09 AM   #6
swedguy
Confirmed User
 
Industry Role:
Join Date: Jan 2002
Posts: 7,981
http://www.google.se/search?sourceid...hile+flock+php

examples
swedguy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-08-2005, 09:24 AM   #7
Dusen
Confirmed User
 
Join Date: Aug 2002
Location: East Coast.
Posts: 2,251
Wicked guys, thanks.

According to this:

http://www.hudzilla.org/php/8_11_0.php

You don't even need to use a while loop?

Quote:
The file locking mechanism in PHP automatically makes processes queue up for their locks by default. For example, save this next script as flock.php:
I'll test it now.
__________________
Penis Pill Sponsor List and Reviews:
http://www.pillsponsors.com
Dusen is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-08-2005, 09:26 AM   #8
psili
Confirmed User
 
Join Date: Apr 2003
Location: Loveland, CO
Posts: 5,526
See. Sometimes this place does teach a person something.
__________________
Your post count means nothing.
psili is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.