We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6723
    • 93 Posts
    Hello,

    Problem with a fresh install of Revo on Media Temple servers - parse error in modx.class.php - it goes through all the usual db checks fine - lovely green ticks.

    And when when close to completion at;

    /setup/index.php?action=complete

    It gives this error;

    Parse error: syntax error, unexpected '[' in /nfs/c04/h01/mnt/xxxxx/domains/test2.merseytribe.co.uk/html/core/model/modx/modx.class.php on line 283

    Details
    Apache: 2.2.22
    MySQL: 5.1.66
    PHP: 5.6.21
    Modx Rev 2.7.0

    I've got a few other Modx Rev sites, all running 2.7.0 and they are working fine. But I've tried this now on 2 sub domains, used a couple of different dbs and also downloaded and unzipped the Modx package twice in case of a file corruption but still the same error messages for all attempts.

    Any ideas ?

    Thanks, David
    • Are you sure you're on PHP 5.6, and not on 5.3 or earlier? Line 283 of modx.class.php uses short array syntax which is for 5.4 and up.
        Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

        Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
        • 6723
        • 93 Posts
        Quote from: markh at Dec 11, 2018, 04:06 PM
        Are you sure you're on PHP 5.6, and not on 5.3 or earlier? Line 283 of modx.class.php uses short array syntax which is for 5.4 and up.

        Got me wondering there - back in and yep PHP: 5.6.21 CGI Stable for that domain - it gave me the option to go to 7.0.6 latest - I went for it and boom, it worked.

        Many thanks