Jump to content

Parse error: syntax error, unexpected $end


seethree

Recommended Posts

Hi all,

 

When trying to refresh the user rank images I ran into this problem. It seems to pop up whenever I try to do something which uses misc.php

 

Parse error: syntax error, unexpected $end in /home/318/public_html/admincp/misc.php on line 1843

 

I did a bit of searching and checked that I had <?php instead of <? and as far as I can see I don't have any missing curly brackets...

 

Can anyone take a quick look for me please? I'm stumped  :shrug:

 

I've attached the file below :)

 

Thanks.

 

[attachment deleted by admin]

Link to comment
https://forums.phpfreaks.com/topic/213167-parse-error-syntax-error-unexpected-end/
Share on other sites

Thanks for the reply, Biz.

 

When I click that button it does nothing and just sits there with the error still there. Is there anything else I can try?

 

Thanks.

 

EDIT: Whenever I deleted the last line the error message would shift up to next line. I went through it deleting section-by-section until it gave me no more errors, I've managed to narrow down the error to this section.

 

// ###################### Anonymous Survey Code #######################
if ($_REQUEST['do'] == 'survey')
{
// first we'd like extra phrase groups from the cphome
fetch_phrase_group('cphome');

/*
All the functions are prefixed with @ to supress errors, this allows us to get feedback from hosts which have almost everything
useful disabled
*/

// What operating system is the webserver running
$os = @php_uname('s');

// Using 32bit or 64bit
$architecture = @php_uname('m');//php_uname('r') . ' ' . php_uname('v') . ' ' . //;

// Webserver Signature
$web_server = $_SERVER['SERVER_SOFTWARE'];

// PHP Web Server Interface
$sapi_name = @php_sapi_name();

// If Apache is used, what sort of modules, mod_security?
if (function_exists('apache_get_modules'))
{
	$apache_modules = @apache_get_modules();
}
else
{
	$apache_modules = null;
}

// Check to see if a recent version is being used
$php = @phpversion();

 

EDIT EDIT: I found it!  :D

 

The first { under survey didn't have a closing }, added it in and now it works.

 

Thanks for all the help, this problem had me stuck for days!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.