PHP Processes partially uploaded files

Moderator: Project members

Post Reply
Message
Author
rwap
500 Command not understood
Posts: 1
Joined: 2014-08-14 14:31
First name: Rich
Last name: Mellor

PHP Processes partially uploaded files

#1 Post by rwap » 2014-08-14 14:37

When uploading an altered PHP file, I sometimes get caught out, that someone is using the site at the time, and sees an error saying 'unexpected end of file' or similar.

Now obviously, uploading one altered file should only take a few seconds (depending on your upload speed) - but I wonder if there would be any merit in Filezilla uploading all files with a temporary name, and once the batch upload is complete, deleting the original files on the server and then renaming the uploaded files accordingly.

This might prevent some headaches when uploading say 100 files, which use an updated class and so users might end up with a mixture of old and new files which may or may not be calling an amended function in the class (which may or may not yet be on the server).

Maybe there is some way of overcoming this already?

User avatar
botg
Site Admin
Posts: 35539
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

Re: PHP Processes partially uploaded files

#2 Post by botg » 2014-08-15 06:27

In these cases I upload the new files into a new directory and later just swap the directories.

Post Reply