Posts on the guestbook suddenly disappeared

Dr. GBooky is here to help you with your guestbook problems ...
Post Reply
adamjwagner
Posts: 1
Joined: Mon Mar 31, 2008 9:11 pm

Posts on the guestbook suddenly disappeared

Post 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?
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post 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.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Post Reply