Page 1 of 1
Wrong security number
Posted: Thu May 28, 2009 1:14 pm
by conix
Script URL:
http://www.conix.co.uk/gbook/gbook.php
Version of script: 1.6
Hosting company: CWCS
URL of phpinfo.php:
http://www.conix.co.uk/gbook/phpinfo.php
URL of session_test.php:
http://www.conix.co.uk/gbook/session_test.php
What terms did you try when SEARCHING for a solution: wrong security number
Write your message below:
We get Wrong Security Number error when submitting Guest Book entry. We have tried the session test and that appears to work - any other suggestions or tests we can do? Is there any PHP add-on etc that our ISP need to install/enable. Thnx David
Posted: Fri May 29, 2009 6:51 am
by Klemen
The symptomsa re those of a non-working sessions. Try this:
viewtopic.php?t=1948&highlight=savepath
create the "tmp" folder inside your GBook folder and use this path in the code:
/home/cixadmin/
www.conix.co.uk/www/gbook/tmp
Posted: Mon Jun 01, 2009 4:01 pm
by conix
Thanks for the info.
I have created the tmp folder and modified the scripts (gbook.php and print_sec_img.php accordingly. files get written to the tmp folder but I still get the Wrong Security Number message. Any suggestions?
Posted: Mon Jun 01, 2009 4:21 pm
by conix
What settings are needed for the sessions?
Thanks
Posted: Sun Oct 25, 2009 6:26 am
by pshivers
conix wrote:Thanks for the info.
I have created the tmp folder and modified the scripts (gbook.php and print_sec_img.php accordingly. files get written to the tmp folder but I still get the Wrong Security Number message. Any suggestions?
I just installed guestbook on my website today, first time I've delt with PHP at all. I'm an "IT professional" but websites are just a hobby for me...
http://ca1i.bizland.com/gbook/gbook.php
I was experiencing the same problem first sited in this message after following the instructions here for PHP Session problems as well as the Solutions suggested by my ISP.
I followed Klemen's last instructions to create the "tmp" folder inside my GBook folder. I changed the path to end with "/gbook/tmp" instead of "/cgi-bin/tmp" as you did in gbook.php and print_sec_img.php.
When I created the "tmp" directory I also set its
permissions to 777. Seemed like this might be required in order to read and write to the tmp dir... (666 would probably have been suficient??)
Changed the "autosubmit" option to "1" and all worked as advertised!
Very Cool! I should not get a few thousand SPAM lines in my guestbook within two weeks like I did the last time I created a guestbook for it!
Thanks!
Posted: Mon Oct 26, 2009 12:34 am
by DC
Well it shouldn't be in a cgi-bin dir at all as this is a php script not a perl script php scripts run with all the reg html pages in your main dir and should not be run from a cgi-bin ... just posting this in case others tried to do that and had probs.
DC
Posted: Mon Oct 26, 2009 7:05 pm
by Klemen
DC, CGI isn't just Perl scripts

I've seen (Windows) servers before that didn't allow write access to files outside the cgi-bin folder but worked fine from inside so if people have problems with permissions (especially on Windows) they could try and see if their cgi-bin folder is pre-configured with the correct permissions.
Posted: Mon Oct 26, 2009 7:12 pm
by DC
Got ya, ah figures windows would have issues :-)
I don't use win servers MY Bad :-) ...
But had seen problems on NIX where people tried to run a php script from the cgi-bin and it did not work correctly. Where as perl should be run from the cgi-bin.
So perhapse this is a better way to say what I was trying to say.
DC
Posted: Mon Oct 26, 2009 8:06 pm
by Klemen
I know what you mean. I used to program in Perl so I know the ups and downs and how tricky it can be to install. Actually, I was such a Perl fan that I didn't even want to try PHP until version 4 came out and even then it took me a while to become a believer

Posted: Wed Jan 13, 2010 2:28 am
by dking
Script URL:
http://1stbn1stmarines.org/BnReg/gbook.php
Version of script: 1.7
Hosting company: Blue Genesis
URL of phpinfo.php:
http://1stbn1stmarines.org/BnReg/phpinfo.php
URL of session_test.php:
http://1stbn1stmarines.org/BnReg/session_test.php
What terms did you try when SEARCHING for a solution: wrong security number
I have tried the solutions above, both the cgi-bin/tmp and the BnReg/tmp versions. Permission for tmp dir set to 777
I had ver 1.5 running just fine for a couple of years. I would get 3 spams a day for 3 days in a row, periodically. I would manually delete them. Seemed easier than doing an upgrade. Then after the first of the year 100 a day, every day. So I upgraded, changing directory from gbook to BnReg and name of the entries file and filter_sum, just to dodge their bot. (all spams look alike, all different IP addresses)
a user notified me that it's not working. I did manage to make an entry, but I'm not sure how. When I tried to make a second, it said only one entry per session.
I am at a loss as to where to look next. It seems pretty serios about 'Wrong Security Number'
Posted: Wed Jan 13, 2010 3:22 pm
by Klemen
The guestbook shows typical problems with sessions, although the session test seems fine. It could be an internal issue. If you set $settings['autosubmit'] to 1 in the settings file you probably get a blank image sometimes?
Try deleting these two lines from the settings.php file and see if you get any new error messages when trying to post a message:
Code: Select all
ini_set('display_errors', 0);
ini_set('log_errors', 1);
Posted: Fri Jan 15, 2010 5:34 pm
by dking
I deleted the two lines and error message stay "Wrong Security Number".
I'm not a PHP jock, but am an programmer/IT guy since 1970, I was able to display the number (I think) that was being entered and they appeared to be equal.
Other obseervation: my auto-submit is set to 2 for text number. I really wanted it to be 1, but all I get with that is red X with 'security image' in it. This, despite gd_works.php nicely displays a jumbed 'W O R K S' in white on a red background. This was also true in ver 1.5 on the same server.
My compromise is setting auto submit=0 and using the 'spam-question'. When the spammers find me again, I can easily change it; or go to manual approval.
This is not a complaint. I appreciate the availability of this script. There is no reason that it should not work in my environment (I've quadruple checked all my settings and permission). Apparently its the old cosmic, mystery factor at work.
Posted: Sat Jan 16, 2010 11:18 am
by Klemen
That's exactly what's bothering me - your sessions seem to work fine but inside the GBook they're simply not working hence the errors (and the red X image if you try to use the anti-spam image).
One thing you could try is to download GBook again, don't modify any of the files (
not even the settings.php one), upload it to a test folder of your web site (like
http://1stbn1stmarines.org/test/gbook.php), chmod the entires file to 666 and see if you can submit a message there.