Page 1 of 1

Wrong security number

Posted: Tue Oct 07, 2008 5:01 pm
by zong817
Script URL: http://zongzong.hypermart.net/gbook/gbook.php
Version of script: 1.6 from 14th Feb 2008
Hosting company: http://www.hypermart.net
URL of phpinfo.php: http://zongzong.hypermart.net/gbook/phpinfo.php
URL of session_test.php: http://zongzong.hypermart.net/gbook/session_test.php
What terms did you try when SEARCHING for a solution: wrong security number

Write your message below:

Hi,

First of all, thanks for the guestbook and sorry for asking this question even though I see alot of related posting regarding this topic. But I am still unable to figure out what I had missed.

I am unable to view the graphic ID. If I switch to text mode, I am unable to post a message even I typed in the same number. I tried to add the .htaccess to gbook folder, it will make the whole guestbook unable to access. I also tried to add the below in print_sec_img.php but not sure if I've done it right (must be wrong as it still doesnt' work...)


session_name('GBOOK');
session_save_path(/home/users/web/b1964/hy.zongzong/gbook/tmp);
session_start();


I don't know if it's my provider's problem or not. But I don't know what I should ask to have them help me make the right setting...

Many thanks for your help in advance!

Laura

Posted: Tue Oct 07, 2008 5:16 pm
by Klemen
It's a sessions problem, no doubt. Try this:

Add just this code to top of print_sec_img.php and gbook.php:

Code: Select all

session_save_path(/home/users/web/b1964/hy.zongzong/gbook/tmp); 
Make sure you have a "tmp" folder in your "gbook" folder and make sure the tmp folder is writable by scritps (chmod it to 777 (rwxrwxrwx)).

blank page now

Posted: Tue Oct 07, 2008 5:51 pm
by zong817
Thanks Klemen for the quick reply.

I've added the code like:

print_sec_img.php

<?php
session_save_path(/home/users/web/b1964/hy.zongzong/gbook/tmp);
session_name('GBOOK');
session_start();


gbook.php

<?php
session_save_path(/home/users/web/b1964/hy.zongzong/gbook/tmp);

# PHP guestbook (GBook)
# Version: 1.6
# File last modified: 14th Feb 2008 18:28
# File name: gbook.php
# http://www.PHPJunkYard.com


But it returns a blank page when I try to access http://zongzong.hypermart.net/gbook/gbook.php

Have I add the code in the wrong place...?

Thanks again!!

Posted: Tue Oct 07, 2008 6:00 pm
by Klemen
Ah, invalid syntax. Forgot to add quotes around the tmp folder path, this is the correct one to use:

Code: Select all

session_save_path('/home/users/web/b1964/hy.zongzong/gbook/tmp');

THANK YOU!!!!!!!!!!!!!!!!!

Posted: Tue Oct 07, 2008 6:16 pm
by zong817
it works great now~~ Thank you so much! Next thing I need to do is to put more colors on the guest book~ :lol:

thank you!!

Posted: Sat Oct 11, 2008 1:32 pm
by pete917
I have had the same problem as described here.

Please could you advise how I work out the path required for the session data as shown below:


session_save_path('/home/users/web/b1964/hy.zongzong/gbook/tmp');


I am using dreamweaver.

Posted: Sun Oct 12, 2008 9:10 am
by Klemen
Post your phpinfo file, you will find it in the topic "READ THIS BEFORE POSTING A NEW QUESTION!!"

Posted: Mon Oct 13, 2008 1:23 pm
by pete917
By following the example above I managed to get this one working. It now works for both graphical as well as text based security.

Many thanks