|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34262 mutliple users cause write one but not another
Submitted: 2005-08-25 23:28 UTC Modified: 2005-08-25 23:38 UTC
From: hkncs06 at gmail dot com Assigned:
Status: Not a bug Package: *General Issues
PHP Version: * OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
39 - 4 = ?
Subscribe to this entry?

 [2005-08-25 23:28 UTC] hkncs06 at gmail dot com
NOT sure if this is a bug or program issue. If two people acess the file at the same time, would php write both of their information to the file or one will write to the file and the other doesn't not. With the code below, on the RequestLog.txt file, both of them on that file but only one on the TimeRequested.csv file. Why is this happened? Or this happen because someone is open the file (TimeRequested) while the other write to the file. Any help would be appreciate.

Reproduce code:
$flog = fopen("RequestLog.txt","a");
			fwrite($flog, $name);
			fwrite($flog, " submitted on ");
			fwrite($flog, $day);
			fwrite($flog, " at ");
			fwrite($flog, $time);
			fwrite($flog, "\n");


Expected result:
All information of the two people access at the same time should be in the TimeRequested.csv file

Actual result:
Only one information write to the file.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-08-25 23:38 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at

"a" means that you always append at the end of the file, this information is read upon opening and kept up to date during writing. Thus if you don't lock and both open at the same time the file will only contain the writes of the latter.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue Mar 28 03:03:37 2023 UTC