Page 1 of 1

flock

Posted: Wed Apr 20, 2005 3:28 pm
by shiznatix
im having trouble with locking text files. this always sends me 'couldnt lock it g'. any idea why? i have php 4.3

Code: Select all

$open = fopen('shiznatix.txt', 'w');
if (flock($open, LOCK_SH)){ 
echo 'success lock'; print_r($file_arr); 
}else{ 
echo 'couldnt lock it g';
}

Posted: Wed Apr 20, 2005 5:49 pm
by feyd
what OS is this being run on?
flock() wrote:flock() is not supported on antiquated filesystems like FAT and its derivates and will therefore always return FALSE under this environments (this is especially true for Windows 98 users).

Posted: Thu Apr 21, 2005 4:32 am
by shiznatix
linux apache server