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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Sessions reading same file

Status
Not open for further replies.

SirNuke

Technical User
Mar 5, 2004
58
US
Simple questions to someone who was real-life php experience

Under php4 and IIS 5, what happens when multiple sessions/executions of a php script try to read the same file? In a program I am writing, the files are locked (flock(name, typeOfLock)) when read and unlocked when done. If two try to read, will php simply put holds on the later reading (each file read will take I doubt take a measurable amount of time).

Furthor more, what will happen if suddenly an administrator where edit the file (through php)

Would using MySQL over text files be a better idea?

Thanks
SirNuke
 
Don't make yourself crazy. The nice folks at MySQL AB have already written the code to take care of simultaneous reading/writing of data.

Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top