Hi monks,

I've a perl cgi program hosted at the free hosting site netfirms. I use flat files for the database and the program has worked fine for almost a year - adding and updating entries into flat files of 40-50 lines each. If an update on an entry is required, usually only about two files are affected.

Today, something happened to one of the flat files. It became corrupted! I'm puzzled how that happened. I've never experienced anything like that with my other scripts on other sites (also using flat files).

My question is: What could have caused the file to become corrupted? Could it be a result of someone updating the file and another person accessing the script which required accessing the same file at the same instant? Or is it something to do with the server?

Thanks in anticipation :)

kiat

In reply to Text file got corrupted? by kiat

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.