Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #8044

Re: Files getting clobbered when I run out of disk space

From Jerry Stuckle <jstucklex@attglobal.net>
Newsgroups comp.lang.php
Subject Re: Files getting clobbered when I run out of disk space
Date 2013-01-08 10:26 -0500
Organization A noiseless patient Spider
Message-ID <kchdrj$9qn$1@dont-email.me> (permalink)
References <89d3884a-015f-42a7-910f-7c1c77ba68d9@googlegroups.com>

Show all headers | View raw


On 1/7/2013 6:49 PM, faraz@squashclub.org wrote:
> There was some disk space issues with my server. As a result any script
> I had that opened a file for writing would clobber it i.e truncate it to
> zero length . Since there was no space left on device, nothing would be
> written to it.
>
> Are there any workarounds to this? Here is some code I came up, but it is untested as I currently have disk space on my account:
>
<snip code>

I agree with Adam.  When you're out of space is too late to detect it, 
and PHP is the wrong place to try.

All of my servers monitor disk space (and other things) and send me an 
email when anything gets too far out of whack, even if the web server 
isn't running.  It's all done with freely available tools at the OS level.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Files getting clobbered when I run out of disk space faraz@squashclub.org - 2013-01-07 15:49 -0800
  Re: Files getting clobbered when I run out of disk space Adam Harvey <usenet@adamharvey.name> - 2013-01-08 01:07 +0000
  Re: Files getting clobbered when I run out of disk space "Peter H. Coffin" <hellsop@ninehells.com> - 2013-01-07 21:47 -0600
  Re: Files getting clobbered when I run out of disk space Anders Wegge Keller <wegge@wegge.dk> - 2013-01-08 09:16 +0100
  Re: Files getting clobbered when I run out of disk space Jerry Stuckle <jstucklex@attglobal.net> - 2013-01-08 10:26 -0500
  Re: Files getting clobbered when I run out of disk space "Twayne" <nobody@devnull.spamcop.net> - 2013-01-08 13:01 -0500
    Re: Files getting clobbered when I run out of disk space "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2013-01-08 23:20 +0100

csiph-web