I've got a perl cgi script which displays a load of questions on a webpage
one by one and appends each answer to a text file on the server (one text
file per user). It seems to be doing some odd things with some of the
files where either the file is being deleted or possibly just emptied of
data at some point and then the remaining answers are being written to the
now blank file.
This crops up seemingly at random and only for a very small proportion of
the users. I've been through the perl script until I'm sick of looking at
it, but can't spot anything that's obviously causing this.
It's occurred to me that it could be some weird setting on the webserver
like a max open files setting or something. Of course I don't know if
there is a max open files setting, or if it would cause a blank file to be
written if it was exceeded.
The problem has shown up on linux running apache, solaris running some web
server (possibly apache) and on NT running IIS, which originally made me
think it was the fault the perl script and not the webserver, but as I
can't find any problems in the script I thought I should check out the
webserver end of things too.
I'm not going to post the perl script 'cos it's bloody long, but if anyone
can think of any webserver related (as opposed to perl related) reasons why
something like this might occur I'd be eternally grateful if you could pass
them on. Alternatively if you're all sure that there's no webserver
setting that could be causing this then I'll feel a bit happier about
ruling it out and going back to combing through that poxy perl script...
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!