Wrong security number

Dr. GBooky is here to help you with your guestbook problems ...
Post Reply
zong817
Posts: 6
Joined: Tue Oct 07, 2008 3:51 pm

Wrong security number

Post 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
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post 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)).
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
zong817
Posts: 6
Joined: Tue Oct 07, 2008 3:51 pm

blank page now

Post 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!!
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post 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');
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
zong817
Posts: 6
Joined: Tue Oct 07, 2008 3:51 pm

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

Post 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!!
pete917
Posts: 12
Joined: Sat Oct 11, 2008 1:28 pm

Post 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.
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Post your phpinfo file, you will find it in the topic "READ THIS BEFORE POSTING A NEW QUESTION!!"
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
pete917
Posts: 12
Joined: Sat Oct 11, 2008 1:28 pm

Post 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
Post Reply