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!
Security image problems in IE7 and FF2
Try adding to top of gbook.php and print_sec_img.php, just after the <?php
Upload, close all browser windows and see if it helps.
Code: Select all
ini_set('session.use_trans_sid',0);
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 
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


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
KlemenKlemen wrote:Try addingto top of gbook.php and print_sec_img.php, just after the <?phpCode: Select all
ini_set('session.use_trans_sid',0);
Upload, close all browser windows and see if it helps.
Unfortuanally it didn't help.
Kind regards
Frans
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.
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 
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


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
KlemenKlemen wrote: You can try if this makes any difference:
http://www.phpjunkyard.com/extras/gbook_nosrid.zip
These modifications did the trick

It's working smoothly now, in IE7 as well as in FF2.
Thanks and have a nice weekend
Kind regards
Frans
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.
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.