Page 1 of 3

Neverending "Security-Number"-Check?

Posted: Sun Feb 26, 2006 11:00 pm
by Ravey76
Script URL: http://www.bmw-einzylinder.de/gaestebuch/gbook.php
Version of script: PHP guestbook 1.35
Version of PHP: ?
Hosting company: Strato
Have you searched THIS FORUM for your problem: Yes
(if not please do before posting)
If so, what terms did you try: I had a look myself in the whole section "Gbook"

Write your message below:

Hello,

I installed this guestbook in my homepage and it runs fine. I made some customization to the template and I like it really much.

Only thing is - "Internet Explorer" seems to have a problem with the "Security Number"-Check, after writing and submitting a new message. Whenever I enter the correct code, a NEW check with a new code appears. Its neverending ...

Tried to enter something under "Firefox" and - no problems, everything works fine. Are there some "special" settings in IE?

Thanks a lot for your help,
Karl

Posted: Wed Mar 01, 2006 10:52 pm
by Henrie
Hi Karl,

I have tried to post in your guestbook with Internet Explorer and I had no problems to post.
I just filled in the anti-spam code and my message was posted.

Feel free to delete my post (written in my best German, it has been several years since the last time I wrote a German word but I guess you already noticed that).

I had this problem also sometime in the past and I think I remember it happened because I did not have the right server (unix - windows - MacIntosh) chosen in the settings.php file.

Greetings,
Henrie

Posted: Wed Mar 01, 2006 11:10 pm
by Ravey76
Hello Henrie,

thanks a lot for your reply - your german is quite good :wink:

I don't know in which situation this problem occurs, but I had it on two different PCs (both Win XP and IE 6.0 SP2). I also asked some friends in my forum, and they had the same problem, have a look at this link:

http://www.bmw-einzylinder.de/forum/ind ... 9#msg22459

And they say it occurs even under Mozilla/Firefox

Any other idea?

Kind regards,
Karl

Posted: Tue Mar 07, 2006 11:46 am
by Klemen
Worked for me as well with no problems... Not sure why is it happening to you?

Posted: Tue Mar 07, 2006 12:05 pm
by Ravey76
Hello Klemen,

I played a little bit around the settings of my browser. Now I think to have at least a small idea, why this problem occurs.

I guess it depends on some security settings of my browser. The security level of my IE ist set to "normal" (was "high"), so I think maybe my IE does not accept Session-IDs, Cookies or whatever.

Any idea?

Kind regards,
Karl

Posted: Tue Mar 07, 2006 12:13 pm
by Ravey76
Addition:

I updated my firefox-browser from version 1.0.5 to the actual one (1.5.?.?), tried to post something in the GB, but the problem still exists - neverending number-check... :cry:

Posted: Tue Mar 07, 2006 2:01 pm
by Klemen
Hi,

Blocking session cookies could indeed be the problem. Can you please upload this file to your server and place a link here:
http://www.phpjunkyard.com/extras/phpinfo.zip

I will see if I can help when I have a little more info.

Regards

Posted: Tue Mar 07, 2006 2:41 pm
by Ravey76
Hello Klemen,

I send you a personal message with the link.

Thanks a lot,
Karl

Posted: Tue Mar 07, 2006 4:09 pm
by Klemen
Can you paste function print_secimg from your translated gbook.php file? Just paste everything from

function print_secimg

to

// END print_secimg

here. Lines 190-236 in original version.

Posted: Tue Mar 07, 2006 4:19 pm
by Klemen
Oh, and before you do that try changing this

Code: Select all

<?php echo strip_tags (SID)?>
to

Code: Select all

<?php echo 'PHPSESSID='.session_id(); ?>
in the print_secimg function (line 197 in original version). See if that works.

Regards

Posted: Tue Mar 07, 2006 4:24 pm
by Ravey76
Hello Klemen,

once again thank you for your help :D

Will check the code from your last post, but here at first the mentioned Code:

Code: Select all


function print_secimg($name,$from,$email,$url,$comments,$isprivate,$message=0) {
//$_SESSION['checked']="P";
global $settings;
$_SESSION['checked']=$settings['filter_sum'];
?>
<h3 align="center">Anti-SPAM check</h3>
</p>
<form action="gbook.php?<?php echo strip_tags (SID)?>" method="POST" name="form"><input type="hidden" name="a" value="add">
<table class="entries" cellspacing="0" cellpadding="4" border="0">
<tr>
<td>

<p>&nbsp;</p>
<?php
if ($message == 1) {echo '<p align="center"><b>Geben Sie bitte die Sicherheitsnummer ein</b></p>';}
elseif ($message == 2) {echo '<p align="center"><b>Ungültige Sicherheitsnummer. Bitte erneut eingeben</b></p>';}
?>
<p>&nbsp;</p>
<p>Dies ist ein Sicherheits-Check welcher automatisierte Einträge ins Gästebuch (SPAM) verhindert.<br>
Geben Sie bitte die unten angezeigte Sicherheits-Nummer in das Eingabefeld und bestätigen sie.</p>
<p>&nbsp;</p>
<p>Sicherheits-Nummer: <b><?php echo $_SESSION['secnum']; ?></b><br>
Geben Sie die Sicherheits-Nummer ein:
<input type="text" size="7" name="secnumber" maxlength="5" id="input"></p>
<p>&nbsp;
<input type="hidden" name="name" value="<?php echo $name; ?>">
<input type="hidden" name="from" value="<?php echo $from; ?>">
<input type="hidden" name="email" value="<?php echo $email; ?>">
<input type="hidden" name="url" value="<?php echo $url; ?>">
<input type="hidden" name="comments" value="<?php echo $comments; ?>">
<input type="hidden" name="private" value="<?php echo $isprivate; ?>">
<input type="hidden" name="nosmileys" value="<?php echo $_REQUEST['nosmileys']; ?>">
</p>
<p align="center"><input type="submit" value=" Weiter "></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</td>
</tr>
</table>
</form>

<?php
printCopyHTML();
printDownHTML();
exit();
} // END print_secimg


Posted: Tue Mar 07, 2006 4:33 pm
by Ravey76
Hello again,

I modified the Gbook.php-file as described above, but has no effect... :cry:

It is possible my frameset has an effect on the Session-Behaviour of the GB??

Regards,
Karl

Addition:

I deleted the browser-cache (Firefox) again and it SEEMS to work now, at least I was able to place a new post in the gb... will check now with IE

Addition 2:

IE still doesn't work...

Posted: Tue Mar 07, 2006 4:53 pm
by Klemen
I think I know what the problem is - are you using sessions also in the header/footer files? My guess is you are and GBook is also trying to open a new session...

Try deleting this from gbook.php (line 47):

Code: Select all

session_start();
Then close ALL browser windows and clear browser cache and try again.

Posted: Tue Mar 07, 2006 5:11 pm
by Ravey76
I deleted linke 47 [ session_start(); ] - no effect.

I don't have any other session IDs in header/footer running.
The onyl thing I modified with your script was: colors, language and I added the navigation script (because the gb is part of a frame set).

When I start the gb outside of the frameset, it also doesnt work with IE...

Posted: Tue Mar 07, 2006 7:57 pm
by Klemen
Can you install a CLEAN version of GBook (the original English one) and we'll see if that one works ok?