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


Groups > comp.lang.php > #7677

Re: file being saved causes fatal error.

From "M. Strobel" <sorry_no_mail_here@nowhere.dee>
Newsgroups comp.lang.php
Subject Re: file being saved causes fatal error.
Date 2012-12-03 10:20 +0100
Message-ID <ai396rFt65oU1@mid.uni-berlin.de> (permalink)
References <5df82eb2-79d5-48c6-aae5-ac0d333b816b@googlegroups.com>

Show all headers | View raw


Am 28.11.2012 03:28, schrieb rodeored:
> If a website user if trying to access a class file at the same time it is being saved, this causes a fatal error. Is there anyway to save the file without causing it to be unavailable for any amount of time? 
> 

Just think about your case:

the file is being updated. That means it is not complete.

Depending on how the update software works, you can either read a file of zero
length, or an incomplete file.

What will happen if PHP reads/executes a class file of zero lenght? The class
definition is missing, fatal.

What will happen, if PHP reads/executes an incomplete file? A syntax error, fatal.

What you must do:
- make sure the class file is not read/executed during update.

What you can do:
- speed up the upgrade process (upload to some other file and copy locally, ...)

/Str.

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


Thread

file being saved causes fatal error. rodeored <info1@reenie.org> - 2012-11-27 18:28 -0800
  Re: file being saved causes fatal error. Jerry Stuckle <jstucklex@attglobal.net> - 2012-11-27 22:42 -0500
    Re: file being saved causes fatal error. rodeored <info1@reenie.org> - 2012-11-28 07:57 -0800
      Re: file being saved causes fatal error. Robert Heller <heller@deepsoft.com> - 2012-11-28 11:30 -0600
      Re: file being saved causes fatal error. Jerry Stuckle <jstucklex@attglobal.net> - 2012-11-28 12:52 -0500
      Re: file being saved causes fatal error. The Natural Philosopher <tnp@invalid.invalid> - 2012-11-28 19:02 +0000
      Re: file being saved causes fatal error. Anders Wegge Keller <wegge@wegge.dk> - 2012-11-28 20:15 +0100
  Re: file being saved causes fatal error. "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-12-03 10:20 +0100

csiph-web