Page 1 of 1
You already have a message waiting approval!
Posted: Wed May 12, 2010 6:59 pm
by wolf
Script URL:
http://wolfgang.vacau.com/~wolf/gbook/gbook.php
Version of script: 1.7
Hosting company: 000webhost.com
URL of phpinfo.php:
http://wolfgang.vacau.com/temp/phpinfo.php
URL of session_test.php:
http://wolfgang.vacau.com/temp/session_test.php
What terms did you try when SEARCHING for a solution:
You already have a message waiting approval!
Write your message below:
NOTE ABOUT URL's: all URL's are password protected, with user
php and password
php.
When someone tries to access the guestbook after having made a post, they get the following message:
Error
You already have a message waiting approval!
This happens even after they close the browser, log out, shut down, and try again (as far as I can tell). I haven't gotten an email with the approve/deny, and there is no file pending approval in the apptmp folder. The readme is no help, and I can't find any post RE this problem. I'm not that good with PHP (especially if I didn't write it), so I can't really read the script and figure out how to fix this. Perhaps the script uses cookies?...
Thanks in advance for your help.

Posted: Thu May 13, 2010 7:01 am
by Klemen
I was able to submit a message without poblems and don't get any error messages.
Still not working
Posted: Thu May 13, 2010 7:32 pm
by wolf
I tried clearing all browsing data (cookies, etc.), and still get this message.
As I stated before, I cannot find anywhere that the guestbook would store this data.
If it helps, I am using the Google Chrome web browser. I rejected your test post; try posting again. I suspect you may get the message.
This problem is driving me crazy!
Posted: Fri May 14, 2010 8:32 am
by Henrie
I have also posted a message in your guestbook.
I used Google Chrome 4.1
What I did.
- Posted a message.
- Tried to post another message. Got Error message that i am only allowed to post one message per session.
- Closed Google Chrome and restarted. Tried to post another message, I get the error You already have a message waiting approval!
Now let's see what happens when you reject or approve the message.
Greetings,
Henrie
Posted: Fri May 14, 2010 7:03 pm
by Klemen
I just tried posting again - no problems.
The "You already have a message waiting approval" error is tied to an IP address so if you post a message from an IP address you won't be able to post a new one until the old one (posted from the same IP) isn't approved or rejected.
Disable once_per_session
Posted: Mon May 17, 2010 11:50 am
by wolf
The problem is that I have a whole bunch of people connecting from the same IP address (most of the people who connect to my site, including me). Thus, when one person signs the guestbook,
everyone is blocked. I changed my settings file to read:
Code: Select all
/* Prevent multiple submissions in the same session? 1 = YES, 0 = NO */
$settings['one_per_session']=0;
However, I
still get the message. How do I reset the IP addresses so it stops doing this?? [/code]
Problem solved!
Posted: Mon May 17, 2010 2:28 pm
by wolf
Never mind. I fixed the problem.
There was an old test post hanging around, which was never rejected. This caused the guestbook to block my IP address. I just rejected the post, and the problem cleared right up. Thank you for your quick response!

Fix found...
Posted: Fri May 21, 2010 2:37 pm
by wolf
Yesterday, I had three people tell me within 20 minutes that my guestbook was broken. Same IP address, etc. as before. So, I did some poking around in the code and discovered that the
setting does not have an effect, as the IP address is used anyway. However, I fixed the problem by changing
Code: Select all
$tmp = md5($_SERVER['REMOTE_ADDR'].$settings['filter_sum']);
to
Code: Select all
$tmp = md5($_SERVER['REMOTE_ADDR'].$settings['filter_sum'].date('Uu'));
This appends the seconds and milliseconds since the Unix epoch onto the end. Since it is very unlikely that two people will submit entries at the same millisecond, this insures unique filenames.
Posted: Fri May 21, 2010 7:57 pm
by Henrie
$settings['one_per_session'] is used so that visitors can only post one message per browser session. And this works as it should.
The $settings['one_per_session'] has nothing to do with the manual approval function. These are two entirely different functions.
By changing the code, you have changed that someone can have more than one message waiting for approval instead of only one.
If you would set $settings['one_per_session']=1; your visitors can still only post one message without closing their browser in between.
Henrie