Page 1 of 1

unexpected T_VARIABLE

Posted: Mon Jun 13, 2005 6:34 pm
by gransden4
Script URL: www.claygatescouts.org/guestbook/gbook
Version of script: 132
Version of PHP: 4
Hosting company: FREEOLA.net
Have you searched THIS FORUM for your problem: Yes
(if not please do before posting)
If so, what terms did you try: unexpected T_VARIABLE
Write your message below:

The full error I get in trying to load gbook is as follows:
"Parse error: parse error, unexpected T_VARIABLE in /freeola/users/5/8/sr0182885/htdocs/guestbook/settings.php on line 18"

Line 18 is as follows:
17 = /* Website URL */
18 = $settings['website_url']="http://www.claygatescouts.org/";

This is Line 18 only because I have retained the original script lines, making them unreadable by using, for example "/* ORIGINAL $settings['apass']="admin"; */"

Perhaps you can help on this one please? :?

Posted: Mon Jun 13, 2005 10:03 pm
by Klemen
Hi,

This is an error in your settings.php file. Paste your full settings.php here (replace password with *****) and I will have a look.

Regards

unexpected T_VARIABLE

Posted: Tue Jun 14, 2005 11:56 am
by gransden
Herewith the full script of settings.php (Password Changed as requested)...
I hope you can indentify the error for me!
================================
<?php
/* >>> SETUP YOUR GUESTBOOK <<< */
/* Detailed information found in the readme file */

/* What type of server is your website on?
1 = UNIX (Linux), 2 = Windows, 3 = Machintos */
$settings['system']=1;

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

/* Website title */
/* ORIGINAL $settings['website_title']="My lovely website"; */
$settings['website_title']="1st Claygate Scouts"

/* Website URL */
$settings['website_url']="http://www.claygatescouts.org/";

/* Guestbook title */
/* $settings['gbook_title']="My lovely website - guestbook"; */
$settings['gbook_title']="1st Claygate Scouts - guestbook";

/* 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']=1;

/* Your e-mail. Only required if $settings['notify'] is set to 1 */
/* $settings['admin_email']="you@yourdomain.com"; */
$settings['admin_email']="webmaster@claygatescouts.org";

/* URL of the gbook.php file. Only required if $settings['notify'] is set to 1 */
/* $settings['gbook_url']="http://www.domain.com/guestbook/gbook.php"; */
$settings['gbook_url']="http://www.claygatescouts.org/guestbook/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 (SPAM)? 1 = YES, 0 = NO */
$settings['autosubmit']=1;


/* >>> OPTIONAL SETTINGS <<< */

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

Posted: Tue Jun 14, 2005 12:54 pm
by Klemen
Hi,

Change

$settings['website_title']="1st Claygate Scouts"

to

$settings['website_title']="1st Claygate Scouts";

(note that a semi-colon comes at the end). It should work then.

Regards,

unexpected T_VARIABLE

Posted: Tue Jun 14, 2005 1:01 pm
by gransden4
Klemen,

Many thanks for your help. Having been through the script several times before posting the query, I then have just found it myself!

Sorry for troubling you and thanks once again!