From:             [EMAIL PROTECTED]
Operating system: NT
PHP version:      4.0.4pl1
PHP Bug Type:     Scripting Engine problem
Bug description:  flock doesn't work properly on Windows 2000

#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'); 



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

Edit Bug report at:

PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to