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.

Problem with Fresh Install

patsjvpatsjv
edited September 2008 in Vanilla 1.0 Help
I am unzipping and uploading Vanilla 1.1.5 and trying to start a fresh install. However I get the following error message:

Parse error: parse error, unexpected '=', expecting ')' in /home/content/p/i/t/pitiviti/html/eldp/forum/library/Framework/Framework.Class.IntegrityChecker.php on line 74

Any ideas?
«1

Comments

  • I would try to re-upload the library/Framework/Framework.Class.IntegrityChecker.php
  • Thanks, Dino. I've tried several times without luck, and still get that same parse error message. I'm unzipping from the most recent release, and have uploaded and overwritten versions multiple times.
  • Copy and paste the content of Framework.Class.IntegrityChecker.php around line 74. I check the svn and the zip and it seems fine.
  • edited September 2008
    Hi Guys, Yeah I am getting the exact same error just now. I have tried installing the latest release and still get this error. "Parse error: syntax error, unexpected '=', expecting ')' in /library/Framework/Framework.Class.IntegrityChecker.php on line 74" Any ideas for a fix? Cheers Andy
  • tried to install vanilla yesterday and got the same error.
  • edited September 2008
    Here is the line:
    var $Delimiter = ','; /** * Constructor * * @param string $Source * @param string $Root * @param ReportMd5 $Reporter * @return IntegrityChecker */ function IntegrityChecker($Root = null, &$Reporter = null) {
    maybe try to remove the spaces like:
    function IntegrityChecker($Root=null, &$Reporter=null) {
  • thank you dinaboff, i've modificated the script and tried what you suggested, but it doesn't stop the error. the error message stays the same ... any other ideas?
  • edited September 2008
    Can you copy and paste the content of library/Framework/Framework.Class.IntegrityChecker.php (just the first 74 lines), the one on your server?
  • i copied the first part of the script and an included file (all from server): first 78 lines of "Framework.Class.IntegrityChecker.php": -------------------------------------------------------------------------- <?php include_once 'Framework.Class.DirectoryScanner.php'; /** * Integrity Checker. * * Beta version! the protocol may change. * * examples: * <code> * // check signature of files in ./; ./appg/md5.csv is hold the signature to compare to * $Checker = new IntegrityChecker('./'); * $Checker->Check('./appg/md5.csv'); * * // To build the sgnatures: * $Checker = new IntegrityChecker('./'); * $Checker->Save('./appg/md5.csv'); * </code> * @package Framework */ class IntegrityChecker extends DirectoryScanner { /** * Path to the file containing the list of filed and their signature * @var string */ var $Source; /** * Reference signature loaded from the source file * @var array */ var $Ref = array(); /** * List of files for which the signature doesn't match * @var array */ var $Errors = array(); /** * csv field delimiter for the signature list * @var string */ var $Delimiter = ','; /** * Constructor * * @param string $Source * @param string $Root * @param ReportMd5 $Reporter * @return IntegrityChecker */ function IntegrityChecker($Root=null, &$Reporter=null) { if (!$Reporter) { $Reporter = new ReportMd5($Root); } $this->DirectoryScanner($Reporter); } -------------------------------------------------------------------------- included file "Framework.Class.DirectoryScanner.php": -------------------------------------------------------------------------- class DirectoryScanner { var $Reporter; var $BlackList = array('.', '..', '.svn'); function DirectoryScanner(&$Reporter = null) { if (!$Reporter) { $Reporter =& new Reporter(); } $this->Reporter =& $Reporter; } function Scan($DirPath) { $Handler = opendir($DirPath); $File = false; $FilePath = ''; if ($Handler !== false) { while(($File = readdir($Handler)) !== false) { if (!in_array($File, $this->BlackList)) { $FilePath = $DirPath . '/' . $File; if (is_dir($FilePath)) { $this->Scan($FilePath); } else { $this->Reporter->Add($FilePath); } } } closedir($Handler); return true; } else { // @todo: add error message; return false; } } } /** * Generic Reporter for the directory scanner * * Beta version! the protocol may change. * * @package Framework */ class Reporter { var $Reader; function Reporter(&$Reader = null) { if (!$Reader) { $Reader =& new FileReader(); } $this->Reader =& $Reader; } function Add($FilePath) { echo $FilePath . ":\n" . $this->GetFile($FilePath) . "\n-----------\n"; } function GetFile($FilePath) { return $this->Reader->Read($FilePath); } } /** * Generic File Reader for the directory scanner * * Beta version! the protocol may change. * * @package Framework */ Class FileReader { function Read($FilePath) { $Handle = @fopen($FilePath, "r"); if($Handle !== false) { $Content = @fread($Handle, filesize($FilePath)); fclose($Handle); return $Content; } else { return false; } } } -------------------------------------------------------------------------- thanks
  • Can you put the code between code tags: <code>...</code> and select a Html format. It is to prevent vanilla from corrupting the code.
  • I get this off the server:

    <?php include_once 'Framework.Class.DirectoryScanner.php'; /** * Integrity Checker. * * Beta version! the protocol may change. * * examples: * <code> * // check signature of files in ./; ./appg/md5.csv is hold the signature to compare to * $Checker = new IntegrityChecker('./'); * $Checker->Check('./appg/md5.csv'); * * // To build the sgnatures: * $Checker = new IntegrityChecker('./'); * $Checker->Save('./appg/md5.csv'); *
    * @package Framework
    */
    class IntegrityChecker extends DirectoryScanner {

    /**
    * Path to the file containing the list of filed and their signature
    * @var string
    */
    var $Source;

    /**
    * Reference signature loaded from the source file
    * @var array
    */
    var $Ref = array();

    /**
    * List of files for which the signature doesn't match
    * @var array
    */
    var $Errors = array();

    /**
    * csv field delimiter for the signature list
    * @var string
    */
    var $Delimiter = ',';

    /**
    * Constructor
    *
    * @param string $Source
    * @param string $Root
    * @param ReportMd5 $Reporter
    * @return IntegrityChecker
    */
    function IntegrityChecker($Root = null, &$Reporter = null) {
    if (!$Reporter) {
    $Reporter = new ReportMd5($Root);
    }
    $this->DirectoryScanner($Reporter);
    }
  • edited September 2008
    Try:
    function IntegrityChecker($Root='', &$Reporter='') {

    Which version of php are you using?
  • Hey Dino, I am using 4.4.8 and that change didn't help :( Any other ideas ? Thanks again for replying!
  • edited September 2008
    I upgraded to php 5.2.6 and it worked with the original code and then I went to stage 2 and got this error:

    Vanilla Installation Wizard (Step 1 of 3) We came across some problems while checking your permissions... Some files seems to be missing or corrupted: themes/settings_role_edit.php might be corrupted. library/Framework/Framework.Functions.php might be corrupted. themes/discussion.php might be corrupted. themes/head.php might be corrupted. ajax/updatecheck.php might be corrupted. library/Framework/Framework.Class.DirectoryScanner.php might be corrupted. setup/upgrader.php might be corrupted. ajax/sortroles.php might be corrupted. themes/settings_applicants_form.php might be corrupted. themes/settings_role_list.php might be corrupted. library/Framework/Framework.Class.IntegrityChecker.php might be corrupted. setup/style.css might be corrupted. themes/vanilla/styles/default/src/vanilla.css might be corrupted. setup/installer.php might be corrupted. library/Framework/Framework.Class.Uploader.php might be corrupted. setup/index.php might be corrupted. library/People/People.Control.ApplicantsForm.php might be corrupted. library/People/People.Class.User.php might be corrupted. library/Framework/Framework.Class.SqlBuilder.php might be corrupted. ajax/sortcategories.php might be corrupted. themes/notices.php might be corrupted. library/People/People.Control.SignInForm.php might be corrupted. readme.html might be corrupted. appg/init_vanilla.php might be corrupted. appg/init_people.php might be corrupted. appg/version.php might be corrupted. conf/readme.txt might be corrupted. themes/settings_category_list.php might be corrupted. themes/settings_category_edit.php might be corrupted.
  • edited September 2008
    There is a link to skip the check at the bottom.


    And for the parsing error, I can reproduce the problem with 4.4.8. it might be a bug with php 4.4.8 because it's working with php 4.4.7.
  • I´m using PHP 4.4.9 and get the same parsing error ... Can anybody help me to get this running?? I'd love to use Vanilla!! Can't be that there are problems with certain PHP versions ...
  • Works sweet in PHP 5+ - think its a bug associated with the PHP version and reading the code ....

    Best way to do it - install vanilla in a separate subdomain and upgrade this to PHP 5
  • edited September 2008
    here is how the bug is triggered:
    <?php class A { function A(&$b=null) {} } $a = new A();

    we will upload a new package ASAP without the integrity checker.
  • edited September 2008
    Try out http://vanilla-friends.googlecode.com/files/vanilla-1.1.5a.zip The integrity checker is still in the library and compatible with php4, but there is not integrity check since It only works on windows.
  • this download worked for me thanx dinoboff!!! just one question: is this a stable version for secure use or some kind of beta? thx again
This discussion has been closed.