mattchewone Posted May 24, 2009 Share Posted May 24, 2009 Hi, i am new to the forum and PHP. I am currently running a SMF forum, i had a fair amount of third party modifications installed and friday i installed another one, it had a few errors when installing which i queried the author and he said to manual edit after installing which i was happy to do. As soon as i did i got this message : - Parse error: syntax error, unexpected T_VARIABLE in /xxxx/xxxx/SMF/www/index.php on line 1 Someone kindly went through it for me and i uploaded the edited one and i am now getting this : - Parse error: syntax error, unexpected '}' in /xxxx/xxxx/SMF/www/index.php on line 332 Would anyone be able to help me fix the problem? Here is all i found on line 332 : - 'credits' => array('Who.php', 'Credits'), Many Thanks Matt Quote Link to comment Share on other sites More sharing options...
DarkSuperHero Posted May 24, 2009 Share Posted May 24, 2009 we probably need to see more code say about line 315-340 ? What happens is the php parser doesnt bring up an error until it thinks there is somethign wrong which might not always be exactly where the error is... but your probably missing an opening { way earlier in the code or have an extra } around 332 somewhere... Quote Link to comment Share on other sites More sharing options...
mattchewone Posted May 24, 2009 Author Share Posted May 24, 2009 I am using a basic text editor on my mac called smultron. Here is part some code - line 300-342 // -> end change PortaMx } // Topic is empty, and action is empty.... MessageIndex! elseif (empty($topic)) { require_once($sourcedir . '/MessageIndex.php'); return 'MessageIndex'; } // Board is not empty... topic is not empty... action is empty.. Display! else { require_once($sourcedir . '/Display.php'); return 'Display'; } } // Here's the monstrous $_REQUEST['action'] array - $_REQUEST['action'] => array($file, $function). $actionArray = array( 'activate' => array('Register.php', 'Activate'), 'admin' => array('Admin.php', 'AdminMain'), 'articles' => array('Articles2.php', 'ArticlesMain'), 'announce' => array('Post.php', 'AnnounceTopic'), 'announcements' => array('Announcements.php', 'AnnouncementsMain'), 'arcade' => array('Arcade.php','Arcade'), 'attachapprove' => array('ManageAttachments.php', 'ApproveAttach'), 'buddy' => array('Subs-Members.php', 'BuddyListToggle'), 'calendar' => array('Calendar.php', 'CalendarMain'), 'clock' => array('Calendar.php', 'clock'), 'collapse' => array('BoardIndex.php', 'CollapseCategory'), 'coppa' => array('Register.php', 'CoppaForm'), 'credits' => array('Who.php', 'Credits'), 'deletemsg' => array('RemoveTopic.php', 'DeleteMessage'), 'display' => array('Display.php', 'Display'), 'dlattach' => array('Display.php', 'Download'), 'editpoll' => array('Poll.php', 'EditPoll'), 'editpoll2' => array('Poll.php', 'EditPoll2'), 'emailuser' => array('SendTopic.php', 'EmailUser'), 'findmember' => array('Subs-Auth.php', 'JSMembers'), //-> start add PortaMx 'forum' => array('BoardIndex.php', 'BoardIndex'), //-> end add PortaMx At the minute all i get is an error message i am unable to access the forum at all. Many Thanks Matt Quote Link to comment Share on other sites More sharing options...
mattchewone Posted May 24, 2009 Author Share Posted May 24, 2009 Is there any one able to help as i am unable to access the forum at all. All i get is that message. Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted May 24, 2009 Share Posted May 24, 2009 What line(s) did you add to index.php? Something you added has caused it. The code you posted seems to be ok. Also can tell us what version of SMF you are using and the mod you trying to install. Quote Link to comment Share on other sites More sharing options...
mattchewone Posted May 24, 2009 Author Share Posted May 24, 2009 I am using SMF 2.0 RC1 and it was YAGAM i was trying to install. I replaced with this - 'announce' => array('Post.php', 'AnnounceTopic'), 'announcements' => array('Announcements.php', 'AnnouncementsMain'), Then i had an error message saying that there - syntax error, unexpected T_VARIABLE in /home/matthew09/SMF/www/index.php on line 1 Then someone edited the file and it gave me the current unexpected } error Matt Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.