note 120874 added to function.flock

From: Date: Mon, 27 Mar 2017 06:14:12 +0000
Subject: note 120874 added to function.flock
Groups: php.notes 
Request: Send a blank email to php-notes+get-208945@lists.php.net to get a copy of this message
When a file is closed the lock will be released by the system anyway, even if PHP doesn't do it explicitly anymore since 5.3.2 (the documentation is very confusing about this). However, I had a situation on an apache/PHP server where an out-of-memory error in PHP caused file handles to not be closed and therefore the locks where kept even thought PHP execution had ended and the process had returned to apache to serve other requests. The lock was kept alive until apache recycled those processes. This lack of proper clean up basically makes flock() completely unreliable. ---- Server IP: 72.52.91.14 Probable Submitter: 85.195.255.242 ---- Manual Page -- http://php.net/manual/en/function.flock.php Edit -- https://master.php.net/note/edit/120874 Del: integrated -- https://master.php.net/note/delete/120874/integrated Del: useless -- https://master.php.net/note/delete/120874/useless Del: bad code -- https://master.php.net/note/delete/120874/bad+code Del: spam -- https://master.php.net/note/delete/120874/spam Del: non-english -- https://master.php.net/note/delete/120874/non-english Del: in docs -- https://master.php.net/note/delete/120874/in+docs Del: other reasons-- https://master.php.net/note/delete/120874 Reject -- https://master.php.net/note/reject/120874 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#208945) next »