Page 1 of 1

Posts on the guestbook suddenly disappeared

Posted: Mon Mar 31, 2008 9:17 pm
by adamjwagner
Script URL: http://www.adamjwagner.com/gbook/gbook.php
Version of script: 1.5
Hosting company: Simple Host
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:

posts disappear

Write your message below:

My client just got in touch with me about this issue. He said that he had about 30 people make posts on his guestbook, and now for some reason, only four of them are on there, which means the other 26 suddenly disappeared. I haven't made updates to his site in over a month, so I know it was nothing done while updating the rest of the site.

I am sure that those posts are lost forever, but what might the problem have been? Is there a way to keep this from happening again?

Posted: Tue Apr 01, 2008 1:22 pm
by Klemen
It's probably a corrupted database. You can try adding file locking, just add:

Code: Select all

flock($fp, LOCK_EX);
after each line that starts with

Code: Select all

$fp=fopen
and add

Code: Select all

flock($fp, LOCK_UN);
before each line that has

Code: Select all

fclose($fp);
If you keep having problems after this I would recommend that you try with a MySQL script.