seethree Posted September 11, 2010 Share Posted September 11, 2010 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 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 More sharing options...
BizLab Posted September 11, 2010 Share Posted September 11, 2010 You definately have a missing bracket somewhere, if you're using Dreamweaver you can just use the brace balancing tool on the left of your coding screen it looks like this: {|} that will help you debug. Link to comment https://forums.phpfreaks.com/topic/213167-parse-error-syntax-error-unexpected-end/#findComment-1109983 Share on other sites More sharing options...
seethree Posted September 11, 2010 Author Share Posted September 11, 2010 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! 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! Link to comment https://forums.phpfreaks.com/topic/213167-parse-error-syntax-error-unexpected-end/#findComment-1110001 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.