Hi,
I have a website form that allows users to subscribe to a newsletter. I wrote a sample PHP script that uses fopen() to open a log file named /var/log/signup.txt and add the e-mail to the list (and fclose() afterwards). Very simple.
This is all on a dedicated server. The system is default installation of CentOS 5.5. Web server is Apache 2, running PHP 5.1.6.
It was working fine (I had some 20 e-mails in the list) and this morning I went to /var/log/ and see that signup.txt file is truncated (zero bytes). I suspect this might be to some housekeeping cron job, but don't have a clue where to look. I understand that I lost the data, but how can I prevent this from happening again?
Thanks for any ideas.