Sign Guestbook not working

Dr. GBooky is here to help you with your guestbook problems ...
Post Reply
einstein77
Posts: 12
Joined: Thu Aug 06, 2009 3:04 pm

Sign Guestbook not working

Post by einstein77 »

Script URL: http://laoaglodge71.sqweebs.com/gbook16/gbook.php
Version of script:gbook 1.6
Hosting company:sqweebs.com
URL of phpinfo.php: http://laoaglodge71.sqweebs.com/test/phpinfo.php
URL of session_test.php: http://laoaglodge71.sqweebs.com/test/session_test.php
What terms did you try when SEARCHING for a solution:can't save write sign guestbook

Write your message below:

When i try to sign on my guestbook, the entries are not saved to my log file. I have already changed the CHMOD of my logfile to 666 (rw-rw-rw).

For better understanding of the problem below are the steps.
1. Go to http://laoaglodge71.sqweebs.com/gbook16/gbook.php (webpage is displayed with "No entries yet! ....." message - this one is OK)
2. Click "Sign guestbook" (sign guestbook page is displayed - this one is OK)
3. Enter entries and click "Add my comments" (web page goes back to http://laoaglodge71.sqweebs.com/gbook16/gbook.php without any error messages but this time the "No entries yet! ......" is gone - I think this is not OK)
4. Click "View guestbook" (the message "No entries yet! ...... " is displayed.

I checked the logfile if its empty. and it was empty, so that means that the logfile was not writen. Iam sure i have changed the CHMOD of my logfile to 666 (rw-rw-rw).

To test if my service provider supports php and is able to write log files. i tried using hit counter http://www.phpjunkyard.com/php-text-hit-counter.php. I was able to write to the logifles of the hit counter. Which means my provider does support php and is able to write on my files.

Below is my settings.php (for privacy purposes i changed back the password, logfile name, and checksum to their default values)

<?php
/* >>> SETUP YOUR GUESTBOOK <<< */
/* Detailed information found in the readme file */
/* File version: 1.6 $ Timestamp: 14th Feb 2008 18:37 */

/* Password for admin area */
$settings['apass']='admin';

/* Website title */
$settings['website_title']="Laoag Lodge 71 of F. & A.M.";

/* Website URL */
$settings['website_url']='http://laoaglodge71.sqweebs.com/';

/* Guestbook title */
$settings['gbook_title']="Laoag Lodge 71 Guestbook";

/* Name of the file where guestbook entries will be stored */
$settings['logfile']='entries.txt';

/* Use "Your website" field? 1 = YES, 0 = NO */
$settings['use_url']=0;

/* Open URLs in a new window? 1 = YES, 0 = NO */
$settings['url_blank']=0;

/* Allow private posts (readable only by admin)? 1 = YES, 0 = NO */
$settings['use_private']=1;

/* Hide e-mail addresses? 1 = YES, 0 = NO */
$settings['hide_emails']=1;

/* Allow smileys? 1 = YES, 0 = NO */
$settings['smileys']=1;

/* Send you an e-mail when a new entry is added? 1 = YES, 0 = NO */
$settings['notify']=0;

/* Your e-mail. Only required if $settings['notify'] is set to 1 */
$settings['admin_email']='laoaglodge71@yahoo.com';

/* URL of the gbook.php file. Only required if $settings['notify'] is set to 1 */
$settings['gbook_url']='http://laoaglodge71.sqeebs.com/gbook16/gbook.php';

/* Filter bad words? 1 = YES, 0 = NO */
$settings['filter']=1;

/* Filter language. Please refer to readme for info on how to add more bad words to the list! */
$settings['filter_lang']='en';

/* Prevent automated submissions (recommended YES)? 0 = NO, 1 = YES, GRAPHICAL, 2 = YES, TEXT */
$settings['autosubmit']=1;

/* Checksum - just type some digits or chars. Used to help prevent SPAM */
$settings['filter_sum']='k39dw28rh3';

/* Use JunkMark(tm) SPAM filter (recommended YES)? 1 = YES, 0 = NO */
$settings['junkmark_use']=1;

/* JunkMark(tm) score limit after which messages are marked as SPAM */
$settings['junkmark_limit']=60;

/* Ban IP address if JunkMark(tm) score is 100 (100% SPAM)? 1 = YES, 0 = NO */
$settings['junkmark_ban100']=1;

/* Ignore proxy servers from JunkMark check? 1 = YES, 0 = NO */
$settings['ignore_proxies']=0;

/* Show "NO GUESTBOOK SPAM" banner? 1 = YES, 0 = NO */
$settings['show_nospam']=0;

/* Prevent multiple submissions in the same session? 1 = YES, 0 = NO */
$settings['one_per_session']=1;

/* Maximum chars word length */
$settings['max_word']=75;

/* Language file */
$settings['language']='language.inc.php';

/* Allow IPv6 format? 1 = YES, 0 = NO */
$settings['allow_IPv6']=0;


/* DO NOT EDIT BELOW */
if (!defined('IN_SCRIPT')) {die('Invalid attempt!');}
ini_set('display_errors', 0);
ini_set('log_errors', 1);
?>
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Try setting $settings['autosubmit'] to 0 and see if you can sign it then.
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
einstein77
Posts: 12
Joined: Thu Aug 06, 2009 3:04 pm

Post by einstein77 »

i tried setting 'autosubmit' to 0, same result, no error messages, but entry is still not saved.

i also tried setting it to 2, still same result.

the only differences in setting 0, 1 or 2 is the confirmation code.
0 - no confirmation code
1 - confirmation code shown in graphics
3 - confirmation code shown in text
but still the my guestbook is still empty

i also tried using ardguest1.8 (another guestbook PHP ) just to verify if the provider (sqweebs.com) supports guestbook type PHPs. and it does, ardguest 1.8 worked, but i dont like its design. I like the guetsbook PHP from PHPJunkyard better, it looks great and have more customizations, thats why i like to make it work (with your help) some how.

I also tried to look at the PHP codes of both guestbooks, hoping to compare them and find answers, but as iam just new to scripts, PHPs, htmls, I dint understand the codes.

hope we can make this work.

thanks
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Try deleting this from the settings.php file and let's see if we get any new errors:

Code: Select all

ini_set('display_errors', 0);
ini_set('log_errors', 1);
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
einstein77
Posts: 12
Joined: Thu Aug 06, 2009 3:04 pm

Post by einstein77 »

removing those 2 lines results in
Fatal error: Call to undefined function gzinflate() in /www/sqweebs.com/l/a/o/laoag71/htdocs/gbook16/gbook.php on line 1094
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

This means your host doesn't have the ZLib PHP library installed which is required to make the script work.
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
einstein77
Posts: 12
Joined: Thu Aug 06, 2009 3:04 pm

Post by einstein77 »

Does this mean there is no way i can use your guestbook codes in my website?
Or can install/ipload Zlib on my site?
or is there anything i can install to make it work?

Thanks.
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

This is something your host needs to install not you, but since you are using a free host I doubt they will do it.
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
einstein77
Posts: 12
Joined: Thu Aug 06, 2009 3:04 pm

Post by einstein77 »

i have switched host
http://laoaglodge71.isgreat.org/
all settings are the same, except for the "sqweebs.com" was changed to "isgreat.org"
i dont know if they support ZLib, but the behavior is now different.
but still the same i cant save my comments

check out http://laoaglodge71.isgreat.org/gbook16/gbook.php to see how it is.

thanks
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Seems like the language file is missing or corrupted here. I can't say anything if you don't post session test files, phpinfo and if you get any errors if you remvoe those two line sagain

Code: Select all

ini_set('display_errors', 0); 
ini_set('log_errors', 1);
A tip: with free hosts you will always have such problems.
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
einstein77
Posts: 12
Joined: Thu Aug 06, 2009 3:04 pm

Post by einstein77 »

Sorry i forgot, below are the links

http://laoaglodge71.isgreat.org/test/phpinfo.php
http://laoaglodge71.isgreat.org/test/session_test.php
http://laoaglodge71.isgreat.org/test/session_test2.php

Result in removing those 2 lines:
the error message "Can't open entries file for reading! CHMOD this file to 666 (rw-rw-rw) and make sure your host allows PHP scripts to read from local files!" appears.

I was able to make your hit counter work , which also reads and writes to log file, so i think the host allows PHP scripts to read from local files. And i also place same file properties as those logfiles in the hit counter. I dont know why i cant write/read them.

If i may ask, what is the "execute" in the file permisions for?

thanks
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Can you double-check that the entries.txt file has been uploaded?

If yes:
- exactly what permissions does it have (what did you chmod it to)?

- in the settings.php file what is $settings['logfile'] set to?
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
einstein77
Posts: 12
Joined: Thu Aug 06, 2009 3:04 pm

Post by einstein77 »

with your help guest book is now running OK.
i made a mistake of including file path for the log file instead of just putting the file name of the log file.

Thanks for your time and help.
Post Reply