Not signed in (Sign In)
 
Nov 4th 2007
 
There are still people having problems with corrupted conf/settings.php files.

should we add locking feature to function and classes that update files?
 
Nov 4th 2007
 
I think that would be a good idea. Even if users get errors complaining the file is locked that would be better than the forum going offline until the admin fixed it...
 
Nov 8th 2007
 
One alternative method I have seen used is to write the new contents to a temporary file, then rename it over the existing file. This allows multiple simultaneous writes and reads, won't throw any errors, but isn't as accurate as locking since "last edit wins".
 
Jun 6th 2008
 
Which method should we use?

The locking solution will only work if every developer use them (eg: only using AppendToConfigurationFile to edit a config file). It doesn't prevent an extension to write or read a locked file if it doesn't check for the lock.

The "last edit wins" is not problem when some use a config file for a counter; it won't be accurate but it shouldn't be used for that. Could it be a problem if 2 requests try to set the default settings of an extension at the same time or updating the db schema at the same time?
 
Jun 6th 2008
 
1.2 release anyway I guess.

Issue information

  • 32
  • No assigned user

    No assigned user

     

  • On Hold
  • Low
  • Bug

Vanilla 1.1.2 is a product of Lussumo. More Information: Documentation, Community Support.