php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9203 flock doesn't work properly on Windows 2000
Submitted: 2001-02-10 00:35 UTC Modified: 2002-05-24 20:25 UTC
From: davidspe at yahoo dot com Assigned:
Status: Not a bug Package: Filesystem function related
PHP Version: 4.0.4pl1 OS: NT
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: davidspe at yahoo dot com
New email:
PHP Version: OS:

 

 [2001-02-10 00:35 UTC] davidspe at yahoo dot com
#Dummy initial filehandle to obtain lock via 
$fd = fopen('c:/temp/php_flock_test', 'a'); 

$locked = flock($fd,2); #Exclusive blocking lock 
if (!$locked) { 
print "Error: timeout obtaining lock"; exit; 
} 

#Second (actually used) filehandle 
$fdsafe = fopen('c:/temp/php_flock_test', 'w'); 
fwrite($fdsafe,'Replacement text'); 
fclose($fdsafe); 

fclose($fd); 

//================= 

// This will simply create the file but not put "Replacement text" in the file.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-05-24 20:25 UTC] derick@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately your version of PHP is too old -- the problem
might already be fixed. Please download a new PHP
version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 20:01:31 2024 UTC