Overwriting databases bug in [closedatabase], garbage filescreated

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 21884
interpreted = N
texte = Here's an easy way to hose a database.1. Open a database on the server by performing a search on any db, importantstuff.db. 2. Through file sharing, open importantstuff.db with Excel 98 from another machine. 3. Execute a template which changes some record in importantstuff.db using a replace context. 4. Execute another template which contains [closedatabase importantstuff.db].Importantstuff.db will now contain ONLY two tabs and a single carriage return. No header, no data. Just two tabs. We lost a couple of 2MB databases this way before we figured out the root cause. Luckily we had backups from the previous day.This doesn't appear to happen when Excel is running on the web server. Likewise, the file is not effected when a $flushdatabase command is executed instead of closedatabase.The easy for this is to just don't do that!. However, Webcat does not behave nicely at all here, and it should be fixed.During these tests, I also noticed that several files were created in the root of my Webstar folder with names containing high ascii characters. The contents of these files were single entries from the Errorlog.txt file (and yes, the Webcatalog folder and Errorlog.txt file are in the correct location). The entries were complaining about not being able to locate importantstuff.db, which makes some sense considering the file locking condition that is occurring. However, Webcat shouldn't be writing these garbage files into Webstar root at all. Plus you can't delete them through file sharing, because they have invalid characters in their name...These files have also shown up at various other times since we upgraded to Webcat 3. I suspect a [closedatabase] context is being executed at the same time as we are opening or saving a db using BBEdit. It would probably happen to us more often if we used different tools, but I think BBEdit closes the file once it finishes reading or writing to/from disk.My config: MacOS 8.5 Webstar 3.0.2 Webcat 3.0.3b1 W* Admin 3.0.2 W* SSI 3.0.2Could someone at PCS please confirm this?Thanks,Dale-- Dale LaFountain Director of Information Technology, WebMaster Dark Horse Comics, Inc. mailto:dalel@dhorse.com Phone: 503-652-8815 x324 http://www.darkhorse.com/ Associated Messages, from the most recent to the oldest:

    
  1. Overwriting databases bug in [closedatabase], garbage filescreated (Dale LaFountain 1998)
  2. Overwriting databases bug in [closedatabase], garbage filescreated (Dale LaFountain 1998)
Here's an easy way to hose a database.1. Open a database on the server by performing a search on any db, importantstuff.db. 2. Through file sharing, open importantstuff.db with Excel 98 from another machine. 3. Execute a template which changes some record in importantstuff.db using a replace context. 4. Execute another template which contains [closedatabase importantstuff.db].Importantstuff.db will now contain ONLY two tabs and a single carriage return. No header, no data. Just two tabs. We lost a couple of 2MB databases this way before we figured out the root cause. Luckily we had backups from the previous day.This doesn't appear to happen when Excel is running on the web server. Likewise, the file is not effected when a $flushdatabase command is executed instead of closedatabase.The easy for this is to just don't do that!. However, Webcat does not behave nicely at all here, and it should be fixed.During these tests, I also noticed that several files were created in the root of my Webstar folder with names containing high ascii characters. The contents of these files were single entries from the Errorlog.txt file (and yes, the Webcatalog folder and Errorlog.txt file are in the correct location). The entries were complaining about not being able to locate importantstuff.db, which makes some sense considering the file locking condition that is occurring. However, Webcat shouldn't be writing these garbage files into Webstar root at all. Plus you can't delete them through file sharing, because they have invalid characters in their name...These files have also shown up at various other times since we upgraded to Webcat 3. I suspect a [closedatabase] context is being executed at the same time as we are opening or saving a db using BBEdit. It would probably happen to us more often if we used different tools, but I think BBEdit closes the file once it finishes reading or writing to/from disk.My config: MacOS 8.5 Webstar 3.0.2 Webcat 3.0.3b1 W* Admin 3.0.2 W* SSI 3.0.2Could someone at PCS please confirm this?Thanks,Dale-- Dale LaFountain Director of Information Technology, WebMaster Dark Horse Comics, Inc. mailto:dalel@dhorse.com Phone: 503-652-8815 x324 http://www.darkhorse.com/ Dale LaFountain

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

[showif] results returned... (2003) California Tax Rates (1998) [ShowNext] (1997) WebCat2b12 CGI Mac - [shownext] problem (1997) TCP Connect for a newbie (2002) [WebDNA] Listfiles and sort order (2010) What am I doing wrong? (2000) [WebDNA] 301 redirect on linux (2010) something simple? (1998) encrypt (2000) Testing ... (2002) Searching a field and returning the highest value (1997) EMailer - WebSTAR V - OSX - WebDNA (2003) Doesn't change (WebCat 4.0) (2000) Answer: WebDelivery downloads alias, not original ? (1997) problems with 2 tags (1997) Server Freeze (1998) Feature req. (2002) [Fwd: Rotating Banners ... (was LinkExchange)] (1997) Stumpted Again (1997)