<![CDATA[ Setup missing bracket error when upgrading to 2.7 - My Forums]]> https://forums.modx.com/thread/?thread=104859 <![CDATA[Setup missing bracket error when upgrading to 2.7]]> https://forums.modx.com/thread/104859/setup-missing-bracket-error-when-upgrading-to-2-7?page=2#dis-post-563834
So try again running set up. click to install and get a white screen.

Try uploading 2.6.5 again and running that setup. Same white screen.

Now have to restore the backup.

Tried the same on a second site and succeeded with no error message. Then tried on a third site, and have the same problem as the first.

Any advice on how to consistently upgrade to 2.7 from 2.6.5 without getting error messages about apparently missing brackets?]]>
cottagestuff Jan 30, 2019, 09:17 AM https://forums.modx.com/thread/104859/setup-missing-bracket-error-when-upgrading-to-2-7?page=2#dis-post-563834
<![CDATA[Re: Setup missing bracket error when upgrading to 2.7]]> https://forums.modx.com/thread/104859/setup-missing-bracket-error-when-upgrading-to-2-7?page=2#dis-post-564406
]]>
BobRay Mar 13, 2019, 05:50 AM https://forums.modx.com/thread/104859/setup-missing-bracket-error-when-upgrading-to-2-7?page=2#dis-post-564406
<![CDATA[Re: Setup missing bracket error when upgrading to 2.7]]> https://forums.modx.com/thread/104859/setup-missing-bracket-error-when-upgrading-to-2-7?page=2#dis-post-564400
Like I said, it wasn't a deliberate minimum version bump, but an oversight on my part that nobody else caught in time. If it would've been a deliberate increase in the minimum version, the setup would've also been updated to tell the user their PHP version is out of date so it wouldn't crash.

There's very little point in changing existing code just to use short array syntax, agreed. It's Syntactic sugar and 4 saved bytes at best. Easy habit to get into though. wink
]]>
markh Mar 12, 2019, 08:42 PM https://forums.modx.com/thread/104859/setup-missing-bracket-error-when-upgrading-to-2-7?page=2#dis-post-564400
<![CDATA[Re: Setup missing bracket error when upgrading to 2.7]]> https://forums.modx.com/thread/104859/setup-missing-bracket-error-when-upgrading-to-2-7?page=2#dis-post-564391 ]]> BobRay Mar 12, 2019, 06:55 PM https://forums.modx.com/thread/104859/setup-missing-bracket-error-when-upgrading-to-2-7?page=2#dis-post-564391 <![CDATA[Re: Setup missing bracket error when upgrading to 2.7]]> https://forums.modx.com/thread/104859/setup-missing-bracket-error-when-upgrading-to-2-7?page=2#dis-post-564375 https://github.com/modxcms/revolution/pull/14461

That line was introduced in 2.7.0 (by yours truly... sorry) and because I'm so used to not supporting anything before 5.5 in my extras (which is going up to 7.1 in July 2019) that short array notation accidentally made it into the core. Because it has been catching people off guard it's now been changed to be 5.3 compatible again.

Definitely keep making sure your sites get switched to PHP 7 though. wink]]>
markh Mar 12, 2019, 04:36 AM https://forums.modx.com/thread/104859/setup-missing-bracket-error-when-upgrading-to-2-7?page=2#dis-post-564375
<![CDATA[Re: Setup missing bracket error when upgrading to 2.7]]> https://forums.modx.com/thread/104859/setup-missing-bracket-error-when-upgrading-to-2-7?page=2#dis-post-564348 andytough Mar 08, 2019, 10:18 AM https://forums.modx.com/thread/104859/setup-missing-bracket-error-when-upgrading-to-2-7?page=2#dis-post-564348 <![CDATA[Re: Setup missing bracket error when upgrading to 2.7]]> https://forums.modx.com/thread/104859/setup-missing-bracket-error-when-upgrading-to-2-7?page=2#dis-post-564343 Quote from: andytough at Mar 07, 2019, 12:23 PM
I think it would be worth trying a newer version of PHP. Some people have had problems installing certain extras with PHP versions below 5.4.

Andy, you have rescued me from a very dark place (especially dark after the demise of Keith Flint). I was just seconds away from clicking the "Buy Now" on the Beaver Builder page, which would have meant scrapping MODX and going over to WP. No need now. The sun is shining. The birds are singing in the trees. The caterpillars have stopped eating all our cabbages.

Switched over to PHP 7, ran the install again with no problems. Sorted.

I owe you a coffee, a beer, or a whole barrel of beer.

Thanks also to you, Bob, for your earlier, tireless assistance.]]>
cottagestuff Mar 08, 2019, 08:30 AM https://forums.modx.com/thread/104859/setup-missing-bracket-error-when-upgrading-to-2-7?page=2#dis-post-564343
<![CDATA[Re: Setup missing bracket error when upgrading to 2.7]]> https://forums.modx.com/thread/104859/setup-missing-bracket-error-when-upgrading-to-2-7?page=2#dis-post-564335 running PHP 5.3.29
This is almost certainly your problem. As of PHP 5.4, you can use [] notation for arrays (instead of the traditional array() notation).

Either MODX or one of your extras is using [] notation and PHP 5.3 doesn't know what to do with it. PHP 5.6 would solve your immediate problem, though PHP 5.6 is no longer supported and was released almost five years ago.

If I were in your situation I'd upgrade to at least PHP 7.1, which was released in 2016.

[Update] I didn't see Andy's message before writing this. He definitely got there first with the solution.]]>
BobRay Mar 07, 2019, 09:41 PM https://forums.modx.com/thread/104859/setup-missing-bracket-error-when-upgrading-to-2-7?page=2#dis-post-564335
<![CDATA[Re: Setup missing bracket error when upgrading to 2.7 (Best Answer)]]> https://forums.modx.com/thread/104859/setup-missing-bracket-error-when-upgrading-to-2-7#dis-post-564323 andytough Mar 07, 2019, 12:23 PM https://forums.modx.com/thread/104859/setup-missing-bracket-error-when-upgrading-to-2-7#dis-post-564323 <![CDATA[Re: Setup missing bracket error when upgrading to 2.7]]> https://forums.modx.com/thread/104859/setup-missing-bracket-error-when-upgrading-to-2-7#dis-post-564320
Tried a fresh install of 2.7.1 in a subfolder of the site in question (where 2.6.5 is running perfectly happily) using a new MySQL database and keeping the core for 2.7.1 separate from the one for 2.6.5.

Got to the page where you enter the dbase details. Entered them and clicked to install. Got the next page that says: "Core installation was successful. Click Next to complete the installation," and - BAM! - same damned error message:

Parse error: syntax error, unexpected '[' in /home/finca/public_html/test/core/model/modx/modx.class.php on line 283


I see the modx table looking nice in PHPmyadmin, and the config.inc.php file in core/config looks correct.

This is shared hosting on Linux, running PHP 5.3.29 and dbase: 10.1.37-MariaDB-cll-lve. The server software is Litespeed, not Apache. Could that be the cause of all the woes?



]]>
cottagestuff Mar 06, 2019, 07:59 PM https://forums.modx.com/thread/104859/setup-missing-bracket-error-when-upgrading-to-2-7#dis-post-564320