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

Home » Imported messages » comp.lang.php » file being saved causes fatal error.
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: file being saved causes fatal error. [message #179746 is a reply to message #179721] Mon, 03 December 2012 09:20 Go to previous message
M. Strobel is currently offline  M. Strobel
Messages: 386
Registered: December 2011
Karma:
Senior Member
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.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Experience Web and Smartphone designer required
Next Topic: [Windows] php-cgi.exe can't find extension
Goto Forum:
  

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

Current Time: Fri Nov 22 17:58:48 GMT 2024

Total time taken to generate the page: 0.04546 seconds