note 60974 added to function.fopen

From: Date: Sun, 22 Jan 2006 01:16:04 +0000
Subject: note 60974 added to function.fopen
Groups: php.notes 
Request: Send a blank email to php-notes+get-102221@lists.php.net to get a copy of this message
I found a strange behaviour of PHP when several scripts trying to fopen a file for writing access simultaneously. I expect that this will result file sharing violation, but it's not and all scripts can open and write that file. I'd like to use sharing violation to control uniqueness of script instance, but now I even do know how to do this. The only idea is to use "x" flag in fopen(), but if that lock-file somehow will not be deleted - script will never run. PHP 5.0.5, Windows XP Pro SP2 ---- Server IP: 64.246.30.37 Probable Submitter: 87.224.220.31 ---- Manual Page -- http://www.php.net/manual/en/function.fopen.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+60974 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+60974&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+60974&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+60974&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+60974&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+60974&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+60974&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+60974&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+60974&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#102221) next »