so the security number keeps coming up as wrong
-
- Posts: 10
- Joined: Mon Mar 19, 2012 5:04 pm
so the security number keeps coming up as wrong
Script URL: http://www.unitedcoachtours.com/gbook/gbook.php
Version of script: latest
Hosting company: hostmonster
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:
Write your message below:
The security number keeps coming up wrong....
Version of script: latest
Hosting company: hostmonster
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:
Write your message below:
The security number keeps coming up wrong....
Re: so the security number keeps coming up as wrong
Please post the following so we can try to help find the source of the problem:
URL of phpinfo.php:
URL of session_test.php:
If you do not know what to do with the above, read the following viewtopic.php?f=7&t=83 under b)
Greetings,
Henrie
URL of phpinfo.php:
URL of session_test.php:
If you do not know what to do with the above, read the following viewtopic.php?f=7&t=83 under b)
Greetings,
Henrie
I do not monitor the Gbook forums regularly anymore since I do not use the Gbook script myself anymore for a long time. But it helped me a lot in learning to understand php.
-
- Posts: 10
- Joined: Mon Mar 19, 2012 5:04 pm
Re: so the security number keeps coming up as wrong
First....initially the image was not showing up in the 'captcha' form - http://www.unitedcoachtours.com/gbook/gbook.php?a=sign
so I changed it so only random numbers show up....(not sure how I did that).....
But now a person enters the numbers and the form says they are incorrect...??
hello the files can be found at.....
http://www.unitedcoachtours.com/phpinfo.php
http://www.unitedcoachtours.com/session_test.php
so I changed it so only random numbers show up....(not sure how I did that).....
But now a person enters the numbers and the form says they are incorrect...??
hello the files can be found at.....
http://www.unitedcoachtours.com/phpinfo.php
http://www.unitedcoachtours.com/session_test.php
Re: so the security number keeps coming up as wrong
Something seems to be breaking GBook sessions - my money is on an error in the gbook.php file.
Try this:
1. backup your existing gbook.php file
2. download GBook again.
3. upload a fresh copy of gbook.php file to your server. Do NOT open the fresh gbook.php in any editor or make any changes inside, just upload it to the server.
Does this fix the issue?
By the way - to show captcha image rather than text number set to in settings.php file.
Try this:
1. backup your existing gbook.php file
2. download GBook again.
3. upload a fresh copy of gbook.php file to your server. Do NOT open the fresh gbook.php in any editor or make any changes inside, just upload it to the server.
Does this fix the issue?
By the way - to show captcha image rather than text number set
Code: Select all
$settings['autosubmit']=2;
Code: Select all
$settings['autosubmit']=1;
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
-
- Posts: 10
- Joined: Mon Mar 19, 2012 5:04 pm
Re: so the security number keeps coming up as wrong
Hello,
I uploaded a fresh gbook.php......
It didn't fix it.....
I uploaded a fresh gbook.php......
It didn't fix it.....
Re: so the security number keeps coming up as wrong
Could you please also replace the header.txt file with the original empty file? You can make a backup of your current file to place it back after we have tried fixing your problem.
I ask you this because your header.txt file contains code which is not meant to be in the header.txt file. The header.txt file should only contain html code which is normally placed in the body section of a file.
So it should not contain a doctype declaration <!DOCTYPE ... dtd"> and no <html ... > or <head> ...</head> or <body> sections and tags. This results in a webpage which does not validate to the web standards and which can eventually cause problems.
The wrong header.txt file is probably not the problem, but I just want to eleminate it as a probable source of your problem.
Henrie
I ask you this because your header.txt file contains code which is not meant to be in the header.txt file. The header.txt file should only contain html code which is normally placed in the body section of a file.
So it should not contain a doctype declaration <!DOCTYPE ... dtd"> and no <html ... > or <head> ...</head> or <body> sections and tags. This results in a webpage which does not validate to the web standards and which can eventually cause problems.
The wrong header.txt file is probably not the problem, but I just want to eleminate it as a probable source of your problem.
Henrie
I do not monitor the Gbook forums regularly anymore since I do not use the Gbook script myself anymore for a long time. But it helped me a lot in learning to understand php.
-
- Posts: 10
- Joined: Mon Mar 19, 2012 5:04 pm
Re: so the security number keeps coming up as wrong
Hello,
I replaced the header....but that didn't fix it...
I replaced the header....but that didn't fix it...
Re: so the security number keeps coming up as wrong
Like i said before, I did not really think it would. I just had to make sure it wasn't the problem
Let's hope Klemen got a brilliant idea, because I don't.
Henrie
Let's hope Klemen got a brilliant idea, because I don't.
Henrie
I do not monitor the Gbook forums regularly anymore since I do not use the Gbook script myself anymore for a long time. But it helped me a lot in learning to understand php.
Re: so the security number keeps coming up as wrong
I'm 100% sure something is breaking your sessions. If it's not the gbook.php file then it must be the settings.php file.
Does the security image work if you upload the original settings.php file (clean download without touching/opening it)?
Also check inside your guestbook folder on the server if you have a file called "error_log" or something similar inside. If it is open it in Notepad and let us know what the last few lines say.
Does the security image work if you upload the original settings.php file (clean download without touching/opening it)?
Also check inside your guestbook folder on the server if you have a file called "error_log" or something similar inside. If it is open it in Notepad and let us know what the last few lines say.
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
Re: so the security number keeps coming up as wrong
Maybe the settings.php file was edited with a bad editor.
When i checked the gbook.php file with the w3c validator it mentioned that a utf-8 BOM was present. When I check now it is gone, so it must have been in the header.txt file.
Maybe that is also the problem with the settings.php file, that the editor larryfowler used to edit the settings added the utf-8 BOM.
I am sure though that it could be the cause of the breaking of the sessions.
When i checked the gbook.php file with the w3c validator it mentioned that a utf-8 BOM was present. When I check now it is gone, so it must have been in the header.txt file.
Maybe that is also the problem with the settings.php file, that the editor larryfowler used to edit the settings added the utf-8 BOM.
I am sure though that it could be the cause of the breaking of the sessions.
I do not monitor the Gbook forums regularly anymore since I do not use the Gbook script myself anymore for a long time. But it helped me a lot in learning to understand php.
Re: so the security number keeps coming up as wrong
It's indeed the settings.php file - just checked and it does have BOM.
The header.txt couldn't be the problem (even if with BOM) because the header.txt file is included once all headers are already sent, but other includes (like settings.php) are included early on and the BOM causes HTTP headers to be sent even though GBook still needs other headers later on.
To not confuse Larry too much:
Uploading a clean settings.php file should fix the issue. Once you verify that use a plain text editor like Notepad to edit settings or if using some other editor make sure you don't save it as "utf-8 with byte order mark".
The header.txt couldn't be the problem (even if with BOM) because the header.txt file is included once all headers are already sent, but other includes (like settings.php) are included early on and the BOM causes HTTP headers to be sent even though GBook still needs other headers later on.
To not confuse Larry too much:
Uploading a clean settings.php file should fix the issue. Once you verify that use a plain text editor like Notepad to edit settings or if using some other editor make sure you don't save it as "utf-8 with byte order mark".
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
-
- Posts: 10
- Joined: Mon Mar 19, 2012 5:04 pm
Re: so the security number keeps coming up as wrong
So.....I tried adding the 'clean' settings.php and I got an error saying there was a write error....I changed permissions to 666 and it still wouldn't write to it.....
I did a search in the settings.php and I didn't see any BOM or UTF stuff....
I put my old 'settings.php, gbook.php, and header.txt' .............and now it works...........
Can you guys check it?
I will send beer money soon...
I did a search in the settings.php and I didn't see any BOM or UTF stuff....
I put my old 'settings.php, gbook.php, and header.txt' .............and now it works...........
Can you guys check it?
I will send beer money soon...
Re: so the security number keeps coming up as wrong
No need to sent me any money as I could not fix your problem.
I still get the message "wrong security number" when trying to post a message.
btw, the guestbook does not need to write to the settings.php file, only read it.
On my site the gbook folder has chmod 777 and the settings.php file has chmod 644
And you can not search for the Byte Order Mark it is not shown by most file editors. Try notepad++ ( http://notepad-plus-plus.org/ ) as a file editor. It has a pull down menu named 'encoding' and when you choose it, it shows the current encoding of the file 'encode in UTF without BOM' , or 'encode in UTF' (this is with BOM), or any of the other encodings. With this menu option you can remove the BOM. Best option is to choose 'encode in ANSI'.
Greetings,
Henrie
I still get the message "wrong security number" when trying to post a message.
btw, the guestbook does not need to write to the settings.php file, only read it.
On my site the gbook folder has chmod 777 and the settings.php file has chmod 644
And you can not search for the Byte Order Mark it is not shown by most file editors. Try notepad++ ( http://notepad-plus-plus.org/ ) as a file editor. It has a pull down menu named 'encoding' and when you choose it, it shows the current encoding of the file 'encode in UTF without BOM' , or 'encode in UTF' (this is with BOM), or any of the other encodings. With this menu option you can remove the BOM. Best option is to choose 'encode in ANSI'.
Greetings,
Henrie
I do not monitor the Gbook forums regularly anymore since I do not use the Gbook script myself anymore for a long time. But it helped me a lot in learning to understand php.
-
- Posts: 10
- Joined: Mon Mar 19, 2012 5:04 pm
Re: so the security number keeps coming up as wrong
I am using PHP editor to view the php files....
so what is our next step?
so what is our next step?
-
- Posts: 10
- Joined: Mon Mar 19, 2012 5:04 pm
Re: so the security number keeps coming up as wrong
uh oh...I tried changing the gbook folder to 777...and now its screwed up...
I guess I could do a new installation and save the old folder?
I guess I could do a new installation and save the old folder?