Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Parse error following settings change.

edited December 2006 in Vanilla 1.0 Help
I made a change in a setting using the "Announcements" extension and upon doing so I receive the following error and cannot access my forum any longer. Parse error: parse error, unexpected '<' in /home/________/public_html/dci/forum/conf/settings.php on line 44 Thing is... Line 44 in settings.php is NOTHING Anyone have an idea as to how I can fix this? Here is lines 35-45 for reference... 35 $RequiredPermissionsCount = count($RequiredPermissions); 36 $i = 0; 37 for ($i = 0; $i < $RequiredPermissionsCount; $i++) { 38 if ($Context->Session->User->Permission($RequiredPermissions[$i])) { 39 $Allowed = 1; 40 break; 41 } 42 } 43 if (!$Allowed) header('location:'.GetUrl($Configuration, 'index.php')); 44 45 // 1. DEFINE VARIABLES AND PROPERTIES SPECIFIC TO THIS PAGE

Comments

  • The code you've posted seems to be ok. FWIW, the error line PHP reports can be misleading, as it's indicating where the script compilation breaks, which isn't always where the actual error is.

    Check through the file, and you'll likely missing a quote, single quote, or semi-colon somewhere prior to line 35.
  • Here is the file from where the code STARTS to line 35... I can't see any missing quotes, single quotes, or semi-colons include('appg/settings.php'); $Configuration['SELF_URL'] = 'settings.php'; include('appg/init_vanilla.php'); // Ensure the user is allowed to view this page (they must have at least one of the following permissions) $RequiredPermissions = array('PERMISSION_CHECK_FOR_UPDATES', 'PERMISSION_APPROVE_APPLICANTS', 'PERMISSION_MANAGE_REGISTRATION', 'PERMISSION_ADD_ROLES', 'PERMISSION_EDIT_ROLES', 'PERMISSION_REMOVE_ROLES', 'PERMISSION_ADD_CATEGORIES', 'PERMISSION_EDIT_CATEGORIES', 'PERMISSION_REMOVE_CATEGORIES', 'PERMISSION_SORT_CATEGORIES', 'PERMISSION_CHANGE_APPLICATION_SETTINGS', 'PERMISSION_MANAGE_EXTENSIONS', 'PERMISSION_MANAGE_LANGUAGE', 'PERMISSION_MANAGE_STYLES', 'PERMISSION_MANAGE_THEMES'); $Allowed = 0;
  • You sure that's your conf/settings.php file?
  • Dude, you have my permission to slap me as hard as you can :) Although when I DO go into the CORRECT settings.php, there IS no line 44... it stops @ line 36...
  • Ok I'm looking at this setup file and there is NOTHING that seems out of place... I don't really want to past my conf/settings.php, would anyone know of a more private way for someone to see if THEY can see?
  • Why not just replace the sensitive bits with ***** ?
  • ok.... <?php // Application Settings $Configuration['SETUP_TEST'] = '1'; $Configuration['APPLICATION_PATH'] = '*****/forum/'; $Configuration['DATABASE_PATH'] = '*****/conf/database.php'; $Configuration['LIBRARY_PATH'] = '*****/forum/library/'; $Configuration['EXTENSIONS_PATH'] = '*****/forum/extensions/'; $Configuration['LANGUAGES_PATH'] = '*****/forum/languages/'; $Configuration['THEME_PATH'] = '*****/themes/vaneablack/'; $Configuration['DEFAULT_STYLE'] = '/forum/themes/vaneablack/styles/vaneablack/'; $Configuration['WEB_ROOT'] = '/forum/'; $Configuration['BASE_URL'] = 'http://www.dciscores.com/forum/'; $Configuration['FORWARD_VALIDATED_USER_URL'] = 'http://www.dciscores.com/forum/'; $Configuration['SUPPORT_EMAIL'] = '*******'; $Configuration['SUPPORT_NAME'] = 'james'; $Configuration['APPLICATION_TITLE'] = 'DCI Ranking Forum'; $Configuration['BANNER_TITLE'] = 'DCI Ranking Forum'; $Configuration['COOKIE_DOMAIN'] = 'www.dciscores.com'; $Configuration['COOKIE_PATH'] = '/forum/'; $Configuration['SETUP_COMPLETE'] = '1'; $Configuration['APPLICANT_EMAIL_VERIFICATION_ON'] = '0'; $Configuration['APPLICANT_EMAIL_VERIFICATION_ROLE'] = '0'; $Configuration['APPLICANT_EMAIL_VERIFICATION_APROVE'] = '0'; $Configuration['APPLICANT_EMAIL_VERIFICATION_VERSION'] = '0.3'; $Configuration['ATTACHMENTS_UPLOAD_PATH'] = '*******/uploads/%year%/%month%/'; $Configuration['ATTACHMENTS_MAXIMUM_FILESIZE'] = '512000'; $Configuration['ATTACHMENTS_VERSION'] = '2.0'; $Configuration['EXTENSION_POLL_VERSION'] = '1.3'; $Configuration['ATTACHMENTS_NOTICE'] = '1'; $Configuration['ADDON_NOTICE'] = '0'; $Configuration['LAST_UPDATE'] = '1164053183'; $Configuration['MULTIROLES_VERSION'] = '1.0'; $Configuration['LOG_ALL_IPS'] = '1'; $Configuration['ENABLE_WHISPERS'] = '1'; $Configuration['ALLOW_NAME_CHANGE'] = '0'; $Configuration['CAPTCHA_FLITE_PATH'] = 'NONE'; $Configuration['CAPTCHA_AUDIO_PATH'] = '/tmp/'; $Configuration['CAPTCHA_VERSION'] = '0.2.0'; ?>
  • Anyone? Anyone? Beuler?
  • it seems ok. Are you sure it is the good one? because it doesn't seems to have the announcement extension installed.
  • to avoid these problems with announcement, replace library/Framework/Framework.Class.ConfigurationManager.php by http://lussumo.com/svn/framework/trunk/Framework.Class.ConfigurationManager.php
  • see this discussion for details: http://lussumo.com/community/discussion/4341/?Focus=50010#Item_18
  • Replaced the Framework you specified and I have the code for Announcement IN the settings file and I still get the error... http://www.dciscores.com/forum/ Here are the lines I left out under the CAPTCHA code for Announcement... $Configuration['ANNOUNCE_SETUP'] = '1'; $Configuration['ANNOUNCE_MESSAGE'] = 'Taking applications for the 2007 Fantasy Drum Corps season... see <a href="http://www.dciscores.com/forum/comments.php?DiscussionID=52">the discussion</a> for more information. <strong>19</strong> spots remaining.'; $Configuration['ANNOUNCE_DISAPPEAR'] = '1'; $Configuration['ANNOUNCE_TIME'] = '10'; $Configuration['ANNOUNCE_TEXT'] = '060'; $Configuration['ANNOUNCE_LINE'] = '9C9'; $Configuration['ANNOUNCE_BGCOLOR'] = 'E2F9E3'; $Configuration['ANNOUNCE_ALIGN'] = 'center'; $Configuration['ANNOUNCE_LINESIZE'] = '1'; $Configuration['ANNOUNCE_LINEHEIGHT'] = '200'; $Configuration['ANNOUNCE_MARGIN'] = '10'; $Configuration['ANNOUNCE_FONTSIZE'] = '13';
  • What do you mean 'you left out'? Are they outside the closing php tag "?>"?
  • edited December 2006
    (The replacement won't get ride of the error. The replacement will just stop extensions like announcement to make a mess again in your settings.) If it is that all what is in conf/settings.php, I don't understand the error message. You still can try to take of the line break for the $Configuration['ANNOUNCE_MESSAGE'] setting. ConfigurationManager can't manage settings on multiple lines.
  • edited December 2006
    I've removed the line breaks from the offending settings and I still get the error... Also, Minesweeper... no I quoted my settings.php when I had removed the Announcement Settings... but I reverted back and quoted the part I took out earlier. Here is my settings.php in it's entirety... <?php // Application Settings $Configuration['SETUP_TEST'] = '1'; $Configuration['APPLICATION_PATH'] = '/home/jamesme/public_html/dci/forum/'; $Configuration['DATABASE_PATH'] = '/home/jamesme/public_html/dci/forum/conf/database.php'; $Configuration['LIBRARY_PATH'] = '/home/jamesme/public_html/dci/forum/library/'; $Configuration['EXTENSIONS_PATH'] = '/home/jamesme/public_html/dci/forum/extensions/'; $Configuration['LANGUAGES_PATH'] = '/home/jamesme/public_html/dci/forum/languages/'; $Configuration['THEME_PATH'] = '/home/jamesme/public_html/dci/forum/themes/vaneablack/'; $Configuration['DEFAULT_STYLE'] = '/forum/themes/vaneablack/styles/vaneablack/'; $Configuration['WEB_ROOT'] = '/forum/'; $Configuration['BASE_URL'] = 'http://www.dciscores.com/forum/'; $Configuration['FORWARD_VALIDATED_USER_URL'] = 'http://www.dciscores.com/forum/'; $Configuration['SUPPORT_EMAIL'] = 'james@dciscores.com'; $Configuration['SUPPORT_NAME'] = 'james'; $Configuration['APPLICATION_TITLE'] = 'DCI Ranking Forum'; $Configuration['BANNER_TITLE'] = 'DCI Ranking Forum'; $Configuration['COOKIE_DOMAIN'] = 'www.dciscores.com'; $Configuration['COOKIE_PATH'] = '/forum/'; $Configuration['SETUP_COMPLETE'] = '1'; $Configuration['APPLICANT_EMAIL_VERIFICATION_ON'] = '0'; $Configuration['APPLICANT_EMAIL_VERIFICATION_ROLE'] = '0'; $Configuration['APPLICANT_EMAIL_VERIFICATION_APROVE'] = '0'; $Configuration['APPLICANT_EMAIL_VERIFICATION_VERSION'] = '0.3'; $Configuration['ATTACHMENTS_UPLOAD_PATH'] = '/home/jamesme/public_html/dci/forum/uploads/%year%/%month%/'; $Configuration['ATTACHMENTS_MAXIMUM_FILESIZE'] = '512000'; $Configuration['ATTACHMENTS_VERSION'] = '2.0'; $Configuration['EXTENSION_POLL_VERSION'] = '1.3'; $Configuration['ATTACHMENTS_NOTICE'] = '1'; $Configuration['ADDON_NOTICE'] = '0'; $Configuration['LAST_UPDATE'] = '1164053183'; $Configuration['MULTIROLES_VERSION'] = '1.0'; $Configuration['LOG_ALL_IPS'] = '1'; $Configuration['ENABLE_WHISPERS'] = '1'; $Configuration['ALLOW_NAME_CHANGE'] = '0'; $Configuration['CAPTCHA_FLITE_PATH'] = 'NONE'; $Configuration['CAPTCHA_AUDIO_PATH'] = '/tmp/'; $Configuration['CAPTCHA_VERSION'] = '0.2.0'; $Configuration['ANNOUNCE_SETUP'] = '1'; $Configuration['ANNOUNCE_MESSAGE'] = 'Taking applications for the 2007 Fantasy Drum Corps season... see <a href="http://www.dciscores.com/forum/comments.php?DiscussionID=52">the discussion</a> for more information. <strong>19</strong> spots remaining.'; $Configuration['ANNOUNCE_DISAPPEAR'] = '1'; $Configuration['ANNOUNCE_TIME'] = '10'; $Configuration['ANNOUNCE_TEXT'] = '060'; $Configuration['ANNOUNCE_LINE'] = '9C9'; $Configuration['ANNOUNCE_BGCOLOR'] = 'E2F9E3'; $Configuration['ANNOUNCE_ALIGN'] = 'center'; $Configuration['ANNOUNCE_LINESIZE'] = '1'; $Configuration['ANNOUNCE_LINEHEIGHT'] = '200'; $Configuration['ANNOUNCE_MARGIN'] = '10'; $Configuration['ANNOUNCE_FONTSIZE'] = '13'; ?> I'm stumped... anyone available for AIM?
  • That part after the <a isn't a carriage return, it's just a soft break...
  • Question... since my conversations are stored in the SQL database... is it possible to re-install Vanilla AROUND the current conversations to get fresh settings?
  • Ok I commented out everything after $Configuration['ALLOW_NAME_CHANGE'] = '0';

    Now I can load my forums but now if I try to login it says
    Some problems were encountered
    The requested user could not be found.

    For my admin login... I haven't changed anything in the SQL...
  • All is fixed... I had used the wrong form of comment I used /* comment */ instead of # Comment... I commented out the bad settings and removed the offending plugin and all is better! Thank you guys!
  • Which plug-in did you take off ?
This discussion has been closed.