File locking & cron jobs

From: Date: Fri, 15 Dec 2000 21:09:29 +0000
Subject: File locking & cron jobs
Groups: php.general 
Request: Send a blank email to php-general+get-30587@lists.php.net to get a copy of this message
Hi I've got some files on an extranet that are modifiable by certain users. A shell script runs as a cron job every 10 mins to copy these files to a different web server for general viewing. Since the cron job just copies files, do I have to worry about file locking in PHP? The scenario I'm concerned about is, if php fopen() runs, then the cron job picks that file for copy before fputs() or fclose() are called, will there be problems? I'm hesitant to lock files from PHP - not using flock() but a system that my shell script will adhere to as well - because I fear user-Internet-connection-anything-can-go-wrong causing lock files to not be cleaned up properly. thanks John

« previous php.general (#30587) next »