Page 1 of 2

an error that wont go...?

Posted: Tue Aug 09, 2005 6:35 pm
by gaogier
here it is
Parse error: parse error, unexpected $ in /home/gaogier/public_html/forums/includes/functions_post.php on line 870

i delete the line and it still there what do i do?

Posted: Tue Aug 09, 2005 6:37 pm
by s.dot
most likely you're missing an ending '}' in your code.

Posted: Tue Aug 09, 2005 6:42 pm
by gaogier
ill try that

found another error

Warning: Cannot modify header information - headers already sent by (output started at /home/gaogier/public_html/forums/language/lang_english/lang_admin.php:765) in /home/gaogier/public_html/forums/includes/functions.php on line 867

Posted: Tue Aug 09, 2005 6:47 pm
by s.dot
You cannot modify the header information if it's already been set somewhere else and anything has been written to the browser (including white space).

Posted: Tue Aug 09, 2005 6:48 pm
by gaogier
so what do i do?

Posted: Tue Aug 09, 2005 6:55 pm
by feyd

Posted: Tue Aug 09, 2005 7:00 pm
by s.dot
gaogier wrote:so what do i do?
Post the code of the lines that it's giving you the errors on.

Posted: Tue Aug 09, 2005 7:01 pm
by gaogier
thats cannot add header, i need cannot modify header

Posted: Tue Aug 09, 2005 7:05 pm
by s.dot
gaogier wrote:thats cannot add header, i need cannot modify header
It applies to your situation as well. I believe the 'cannot add header' in the post may actually be meant to be 'cannot modify header'

Posted: Tue Aug 09, 2005 7:07 pm
by feyd
read the thread, it covers both.

Only real way we can help fix your first problem is if you post your code.. or at least.. count all opening and closing parens, braces, brackets, and strings.. one of them is mismatched.

Posted: Tue Aug 09, 2005 7:38 pm
by gaogier
ok, heres the code

Code: Select all

// Redirect via an HTML form for PITA webservers
   if (@preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')))
   {
      header('Refresh: 0; URL=' . $server_protocol . $server_name . $server_port . $script_name . $url);
      echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><meta http-equiv="refresh" content="0; url=' . $server_protocol . $server_name . $server_port . $script_name . $url . '"><title>Redirect</title></head><body><div align="center">If your browser does not support meta redirection please click <a href="' . $server_protocol . $server_name . $server_port . $script_name . $url . '">HERE</a> to be redirected</div></body></html>';
      exit;
   }

   // Behave as per HTTP/1.1 spec for others
   header('Location: ' . $server_protocol . $server_name . $server_port . $script_name . $url);
   exit;
}

?>
line of error

Code: Select all

header('Location: ' . $server_protocol . $server_name . $server_port . $script_name . $url);
JCART | Please use

Code: Select all

tags when posting php code. Review [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]

Posted: Tue Aug 09, 2005 7:41 pm
by feyd
that's not the code I was talking about.. If you read the thread I linked to, you'll understand why and how you get that warning..

I was talking about your original problem...

Posted: Tue Aug 09, 2005 7:43 pm
by gaogier
kk

Code: Select all

'S_SMILIES_COLSPAN' => $s_colspan)
			);
		}
	}

	if ($mode == 'window')
	{
		$template->pparse('smiliesbody');

		include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
	}
}

?>


is that ok?

heres what i done

Code: Select all

'S_SMILIES_COLSPAN' => $s_colspan)
			);
		}
	}

	if ($mode == 'window')
	{
		$template->pparse('smiliesbody');

		include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
	}
}
}
?>

Posted: Tue Aug 09, 2005 7:46 pm
by s.dot
impossible to tell

adding the } may work, but it may be in the wrong place. You should go through and re-indent your page to match the {}s.

Posted: Tue Aug 09, 2005 7:53 pm
by gaogier
it seems to match up