Page 1 of 1

PHP error on Gbook

Posted: Tue Oct 14, 2014 1:03 pm
by GREGHARKINS
Script URL: http://bringingfuntoyou.com/guestbook/gbook.php
Version of script: 1.7
Hosting company: hostmonster
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution: looked for line 1020 error and spam queston

Write your message below:

I am getting this error from HOstmonster regarding the script
[09-Oct-2014 06:07:21 America/Denver] PHP Notice: Undefined index: spam_question in /home1/bringin4/public_html/guestbook/gbook.php on line 1020
[10-Oct-2014 05:27:09 America/Denver] PHP Notice: Undefined index: spam_question in /home1/bringin4/public_html/guestbook/gbook.php on line 1020
[11-Oct-2014 05:00:45 America/Denver] PHP Notice: Undefined index: spam_question in /home1/bringin4/public_html/guestbook/gbook.php on line 1020
[12-Oct-2014 08:32:20 America/Denver] PHP Notice: Undefined index: spam_question in /home1/bringin4/public_html/guestbook/gbook.php on line 1020
[13-Oct-2014 07:06:43 America/Denver] PHP Notice: Undefined index: spam_question in /home1/bringin4/public_html/guestbook/gbook.php on line 1020
[13-Oct-2014 17:56:18 America/Denver] PHP Notice: Undefined index: spam_question in /home1/bringin4/public_html/guestbook/gbook.php on line 1020
[13-Oct-2014 17:56:18 America/Denver] PHP Notice: Undefined index: spam_question in /home1/bringin4/public_html/guestbook/gbook.php on line 820
[13-Oct-2014 17:56:19 America/Denver] PHP Notice: Undefined index: spam_question in /home1/bringin4/public_html/guestbook/gbook.php on line 1020
[14-Oct-2014 03:39:35 America/Denver] PHP Notice: Undefined index: spam_question in /home1/bringin4/public_html/guestbook/gbook.php on line 1020
[14-Oct-2014 06:00:00 America/Denver] PHP Notice: Undefined index: spam_question in /home1/bringin4/public_html/guestbook/gbook.php on line 1020


here is the code as it appears on lines 1019 1020 1021

/* anti-SPAM logical question */
if ($settings['spam_question'])
{


i have no idea why i am getting the error and need some input on what to do next

THanks

Re: PHP error on Gbook

Posted: Wed Oct 15, 2014 8:31 am
by Klemen
It appears that you are missing the

Code: Select all

$settings['spam_question']
variable in file "settings.php".

You should download the original settings.php file from www.phpjunkyard.com, edit it to fit your needs and upload to the server to make sure no settings are missing.

Also, you can change

Code: Select all

$settings['debug_mode'] = 1;
to

Code: Select all

$settings['debug_mode'] = 0;
to hide any PHP notices.