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.
Options

Forum parse error!

edited March 2006 in Vanilla 1.0 Help
Ok, I just uploaded all the files, etc., and went to view my newly created forum. Although, as soon as went to the front page, I got a Parse Error.

Parse error: parse error, unexpected T_STRING in /home/hamish/public_html/vanilla/appg/settings.php on line 29

Now, on line 29 in my settings.php file, there is this piece of code:-

define("agDEFAULT_STYLE", "styles/vanilla/");

And on the vanilla website, it says the default should be:-

define("agDEFAULT_STYLE", "styles/vanilla/");

I don't see what the problem is, as it is exactly the same as the default. Please help!
«1

Comments

  • Options
    edited March 2006
    Did you check the line(s) before 29? Especially keep an eye out for double slashes (//), and backslashes (\)
  • Options
    edited March 2006
    Here is the whole code, just incase, because I may be dong something wrong.

    <?php
    /*
    * Copyright 2003 - 2005 Mark O'Sullivan
    * This file is part of Vanilla.
    * Vanilla is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
    * Vanilla is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or **FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
    * You should have received a copy of the GNU General Public License along with Vanilla; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    * The latest source code for Vanilla is available at www.lussumo.com
    * Contact Mark O'Sullivan at mark [at] lussumo [dot] com
    *
    * Description: Global application constants
    */

    // Database Settings
    define("dbHOST", "localhost");
    define("dbNAME", "hamish_hamishDb");
    define("dbUSER", "hamish_hamish");
    define("dbPASSWORD", "*private*");

    // Path Settings
    define("agAPPLICATION_PATH", "/path/to/vanilla/");
    define("sgLIBRARY", agAPPLICATION_PATH."library/");
    define("agEXTENSIONS", agAPPLICATION_PATH."extensions/");
    define("agLANGUAGES", agAPPLICATION_PATH."languages/");

    // Application Settings
    define("agAPPLICATION_TITLE", "hamishmcgee");
    define("agBANNER_TITLE", "hamishmcgee
    define("agDEFAULT_STYLE", "styles/vanilla/");
    define("agDOMAIN", "http://www.hamishmcgee.hostmatirx.org/vanilla/",
    define("agSAFE_REDIRECT", "signin.php?PageAction=SignOut");
    define("agDISCUSSIONS_PER_PAGE", "30");
    define("agDISCUSSIONS_PER_FEED", "20");
    define("agCOMMENTS_PER_PAGE", "50");
    define("agSEARCH_RESULTS_PER_PAGE", "30");
    define("agCOOKIE_DOMAIN", "http://www.hamishmcgee.hostmatirx.org");
    define("agSUPPORT_EMAIL", "shadow_and_flame@hotmail.com");
    define("agSUPPORT_NAME", "hamishmcgeeSupport");
    define("agALLOW_NAME_CHANGE", "0");
    define("agPUBLIC_BROWSING", "0");
    define("agUSE_CATEGORIES", "1");
    define("agLOG_ALL_IPS", "0");

    // Panel Settings
    define("agPANEL_BOOKMARK_COUNT", "20");
    define("agPANEL_PRIVATE_COUNT", "5");
    define("agPANEL_HISTORY_COUNT", "5");
    define("agPANEL_USERDISCUSSIONS_COUNT", "5");
    define("agPANEL_SEARCH_COUNT", "20");

    // Discussion Settings
    define("agMAX_COMMENT_LENGTH", "5000");
    define("agMAX_TOPIC_WORD_LENGTH", "45");
    define("agDISCUSSION_POST_THRESHOLD", "3");
    define("agDISCUSSION_TIME_THRESHOLD", "60");
    define("agDISCUSSION_THRESHOLD_PUNISHMENT", "120");
    define("agCOMMENT_POST_THRESHOLD", "5");
    define("agCOMMENT_TIME_THRESHOLD", "60");
    define("agCOMMENT_THRESHOLD_PUNISHMENT", "120");
    define("agTEXT_WHISPERED", "Private");
    define("agTEXT_STICKY", "Sticky");
    define("agTEXT_CLOSED", "Closed");
    define("agTEXT_HIDDEN", "Hidden");
    define("agTEXT_BOOKMARKED", "");
    define("agTEXT_PREFIX", "[");
    define("agTEXT_SUFFIX", "]");

    // String Formatting Settings
    define("agDEFAULTSTRINGFORMAT", "Text");
    define("agFORMATSTRINGFORDISPLAY", "DISPLAY");
    define("agFORMATSTRINGFORDATABASE", "DATABASE");

    // Application Mode Constants
    define("agMODE_DEBUG", "DEBUG");
    define("agMODE_RELEASE", "RELEASE");
    define("agMODE_UPGRADE", "UPGRADE");

    // Registration settings
    define("agDEFAULT_ROLE", "0");
    define("agALLOW_IMMEDIATE_ACCESS", "0");
    define("agAPPROVAL_ROLE", "3");

    // Application version - Don't change this value or you may have
    // problems upgrading later.
    define("agVANILLA_VERSION", "0.9.2.6");
    // Note: Vanilla 0.9.2.6 included some extremely important security patches.
    // If you do not have this version installed, we highly recommend that you replace your old vanilla
    // files with this version. It is okay to leave all files in the appg folder as they are.
    ?>
  • Options
    edited March 2006
    Set your application path. No idea if that's what's causing this problem though. And I really didn't need to see your DB password. EDIT: The problem is a missing endquote and semicolon on line 28. Also, line 30 has some problems at the end.
  • Options
    edited March 2006
    Lol, ok, I edited out my password. I'll try fixing the code up then, thanks. EDIT - Hmm...now i've just got a lot more errors! :S Instead of posting all the errors, i'll just post the link. http://www.hamishmcgee.hostmatrix.org/vanilla/ I hope this doesn't count as advertising!
  • Options
    Did you fix the application path?
  • Options
    Do I just put a link to the forum?
  • Options
    yep.
  • Options
    edited March 2006
    Ok, i've done that, and now I get this error!

    Warning: main(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/hamish/public_html/vanilla/index.php on line 15

    EDIT - No, wait, that's just part of theother errors. So, yeah, I have an Application Path, but the errors still appear.
  • Options
    Oops, my bad, the application path is supposed to be a local path, not a URL. If you're using windows, make sure to use forward slashes (/), and make sure there's a forward slash at the end Example: On Windows: "C:/inetpub/wwwroot/forum/" On Linux: "/var/www/forum/"
  • Options
    So, what would my local path be?
  • Options
    I have no idea; where do you put the files you want to be on your website?
  • Options
    /home/hamish/public_html/vanilla/

    would that be right?
  • Options
    Probably.

    Give it a shot.
  • Options
    Oh dear, look what's happened now!

    http://www.hamishmcgee.hostmatrix.org/vanilla/
  • Options
    Is your database server running on the same machine as your web server?
  • Options
    Yeah.
  • Options
    MarkMark Vanilla Staff
    Well, that's a pretty straightforward error. It's failing to connect to your database, so one or more of your db settings are incorrect.
  • Options
    Or the db software isn't running...
  • Options
    Or you don't have the MySQL libraries for PHP installed.
  • Options
    Or your computer hates you. ^_~
This discussion has been closed.