Parse errors on new install

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Ideas Centre
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
alterastro
Registered User
Posts: 131
Joined: Wed Jul 30, 2008 7:21 am
Location: Surrey, UK

Parse errors on new install

Post by alterastro » Tue Dec 28, 2010 7:38 pm

Hi everyone and help!

I have just installed a second forum and it is standard, no mods. I am in the process of adding forums etc but have noticed a couple of anomalies.

If you go to user control panel and click on board preferences I get an error: Parse error: syntax error, unexpected T_STRING in /homepages/13/d252100963/htdocs/SurreyBoB/Forum/includes/ucp/ucp_prefs.php on line 183
Here is the area around 183 in ucp_prefs.php:

Code: Select all

					'sigs'			=> request_var('sigs', (bool) $user->optionget('viewsigs')),
					'avatars'		=> request_var('avatars', (bool) $user->optionget('viewavatars')),
					'wordcensor'	=> request_var('wordcensor', (bool) $user->optionget('viewcensors')),
				);

				if ($submit)
				{
	' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>');
						trigger_error($message);
					}

					// Replace "error" strings with their real, localised form
					$error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error);
				}
183 is the line that starts: ' . sprintf

Everything else in the user control panel seems fine, but in the admin control panel if I click 'custom profile fields' under user and groups, I get: Parse error: syntax error, unexpected T_STRING in /homepages/13/d252100963/htdocs/SurreyBoB/Forum/includes/acp/acp_profile.php on line 236

Heres the area around line 236

Code: Select all

			case 'move_up':
			case 'move_down':
				$field_order = request_var('order', 0);
				$order_total = $field_order * 2 + (($action == 'move_up') ? -1 : 1);

				$sql = 'UPDATE ' . PROFILE_FIELDS_TABLE . "
					SET field_order = $order_total - field_order
					WHERE field_order IN ($field_order, " . (($action == 'move_up') ? $field_order - 1 : $field_order + 1) . ')';
				$db->sql_query($sql);

			break;
236 is the line that starts ' SET field_order'

Can anybody help?

Thanks

Nick

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51888
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Parse errors on new install

Post by Brf » Tue Dec 28, 2010 7:45 pm

You are missing a bunch of lines in both files. What are you using to upload them?

alterastro
Registered User
Posts: 131
Joined: Wed Jul 30, 2008 7:21 am
Location: Surrey, UK

Re: Parse errors on new install

Post by alterastro » Tue Dec 28, 2010 8:12 pm

I used what I've always used - WiseFTP. Seems strange!

Can I just try re-uploading those files?

Thanks

Nick

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51888
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Parse errors on new install

Post by Brf » Tue Dec 28, 2010 8:14 pm

Yes Re-upload them. make sure you are uploading PHP files in ACSII format.

alterastro
Registered User
Posts: 131
Joined: Wed Jul 30, 2008 7:21 am
Location: Surrey, UK

Re: Parse errors on new install

Post by alterastro » Tue Dec 28, 2010 8:23 pm

Excellent! That worked! Thanks a lot!

I can't understand why it would do those wrong though! Oh well... One for the books.

Thanks again.

Nick ;)

Locked

Return to “[3.0.x] Support Forum”