FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Files getting clobbered when I run out of disk space
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Files getting clobbered when I run out of disk space [message #180110 is a reply to message #180106] Tue, 08 January 2013 15:26 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 1/7/2013 6:49 PM, faraz(at)squashclub(dot)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(at)attglobal(dot)net
==================
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: does the php is not popular?i am a phper?
Next Topic: shell script with shell_exec()
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 12:04:33 GMT 2024

Total time taken to generate the page: 0.05026 seconds