On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • DavidJColbran Reply #1, 7 months ago
    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
    • Mark Hamstra Reply #2, 7 months ago
      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.
      • DavidJColbran Reply #3, 7 months ago
        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