ID:               16367
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Closed
 Bug Type:         Feature/Change Request
 Operating System: Debian GNU/Linux
 PHP Version:      4.1.2
 New Comment:

This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.

In PHP5-dev this is avaliable via the 'x' mode.


Previous Comments:
------------------------------------------------------------------------

[2002-03-31 16:09:20] [EMAIL PROTECTED]

I can't find a way to have a script create a file in a directory to be
served by Apache without exposing itself to race conditions. I can't
use tempnam because that doesn't give me control over the file
extension. I can't use file_exits because that will race. I can't use
fopen because I can't use O_EXCL|O_CREAT.

I can work around this by creating subdirectories, because mkdir fails
if the directory already exists. But putting one file per directory is
hardly ideal.

Having a way to use O_EXCL|O_CREAT --- that is, open a file for
writing, creating it, and failing if it already exists all atomicly ---
would be a big help.

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=16367&edit=1

Reply via email to