Security image problems in IE7 and FF2

Dr. GBooky is here to help you with your guestbook problems ...
Post Reply
snarf
Posts: 8
Joined: Tue Mar 04, 2008 11:25 am

Security image problems in IE7 and FF2

Post by snarf »

Script URL:gbook
Version of script:1.6
Hosting company:zenid.net
URL of phpinfo.php:http://www.jaframa.nl/contact/west/gast/phpinfo.php
URL of session_test.php:http://www.jaframa.nl/contact/west/gast ... n_test.php
What terms did you try when SEARCHING for a solution: security image, session cookie

Write your message below:
First of all a great script, simple but effective.
There's only one problem, in FireFox 2 the security image appearce after a refresh of the browser and in internet explorer 7 it dosn't show at all.

So in IE7 I cannot post a message at all and in FF2 after a refresh.
My script is running on a different server than where the web site I am linking from thats www.westenesch.nl/test see menu item gastenboek

I read that because of the session cookies it couldn't work like this but why can it work in FF (after a refresh) and not in IE7 (with or without a refresh)

Is something set wronly can I correct it myselff or must the host correct some items in the php configuration?

Kind regards
Frans de Vries

[edit-1]
Or to avoid this problem can I deactived the "security image" field. And where can I do this, I couldnot find an option for it in the settings.php

[edit-2]
To avoid this problem in FF2 and IE7 I deactivated the smilies and for the text "security image" I ask my visitirs to press F5 to do a refresh of their browser. Next to that I put the main index file to the same server as the guestbook. Now i'ts working after the refresh, somehow the session cookies are not working as they should do. It's not the most neat solution but for now its working. But still ";m waiting for a better solution.......who can help!
snarf
Posts: 8
Joined: Tue Mar 04, 2008 11:25 am

Post by snarf »

Nowbody an idea how to overcome this (I think) cookie problem :?:
Also entering the guestbook directly dosn't solve this problem, a refresh is still needed. When i'm entering the demo on this site its working instantly whithout refresh or other tricks.

kind regards
Frans de Vries
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Try adding

Code: Select all

ini_set('session.use_trans_sid',0);
to top of gbook.php and print_sec_img.php, just after the <?php

Upload, close all browser windows and see if it helps.
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
snarf
Posts: 8
Joined: Tue Mar 04, 2008 11:25 am

Post by snarf »

Klemen wrote:Try adding

Code: Select all

ini_set('session.use_trans_sid',0);
to top of gbook.php and print_sec_img.php, just after the <?php

Upload, close all browser windows and see if it helps.
Klemen

Unfortuanally it didn't help.

Kind regards
Frans
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Hi,

Not sure what is wrong. I see your host has an extension called Suhosin which seems to modify the way sessions and cookies work. Not sure if this is causing problems, but it could be.

You can try if this makes any difference:
http://www.phpjunkyard.com/extras/gbook_nosrid.zip

If not you can try disabling the security image by setting $settings['autosubmit'] to 0.

Sorry I can't be of more help here. I will try to test the Suhosin extension myself over the weekend to see if this is causing problems.
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
snarf
Posts: 8
Joined: Tue Mar 04, 2008 11:25 am

Post by snarf »

Klemen

I'll try your suggestions later on this evening and report it back asap.
This weekend I'm away for a short holiday so I cannot test anything else anyway, so take your time to look what the plugin does (I believe it's some kind of antispam/hacker tool)

Kind regads
Frans de Vries
snarf
Posts: 8
Joined: Tue Mar 04, 2008 11:25 am

Post by snarf »

Klemen wrote: You can try if this makes any difference:
http://www.phpjunkyard.com/extras/gbook_nosrid.zip
Klemen

These modifications did the trick :D
It's working smoothly now, in IE7 as well as in FF2.
Thanks and have a nice weekend

Kind regards
Frans
xammo
Posts: 1
Joined: Thu Jul 03, 2008 9:50 am

Post by xammo »

I came to the following solution:

I've added an "id" to the img tag and then I set the src attribute again with javascript. I seems to work fine in FF and IE7 (I can't test IE6 because the one I have for testing doesn't admit cookies). This is a way to refresh the image without refreshing the entire page.

<p><img id="imgSecurityCode" src="print_sec_img.php" width="100" height="20" alt="'.$lang['t62'].'" style="border-style:solid; border-color:#000000; border-width:1px" /><br />
'.$lang['t56'].' <input type="text" name="mysecnum" size="10" maxlength="5" /></p>
<script type="text/javascript">document.getElementById("imgSecurityCode").src = "'print_sec_img.php?nocache='.time().'";</script>

I hope it helps.
Post Reply