Topic on Project:Support desk

In update.php : syntax error, unexpected '[' in line 170

4
2.137.90.91 (talkcontribs)

Hi.

When I try to execute update.php from command line, PHP terminates with "syntax error, unexpected '[' in line 170".

This is the line causing the error:

$updates = ( 'core', 'extensions' );

I'm trying to update from 1.20 to 1.27. I'm using php 5.6.27, MySQL 5.0.11 and centos-6-x86_64.

When I open update.php using Dreamweaver line 170 is marked like "syntax error", too.

I'm stuck because my 1.20 doesn't work with php 5.6 and the new one needs this database update. I was googling and there's no information about this problem.

Thanks.

2.137.90.91 (talkcontribs)

Sorry, line 170 is $updates = [ 'core', 'extensions' ];

Anyway, line is marked with syntax error using ( ) or [ ] in the same way.

Any ideas?

Ciencia Al Poder (talkcontribs)

Your PHP version is not supported. MediaWiki 1.27 requires PHP version 5.5.9 or later

87.123.33.228 (talkcontribs)

Right. Doing a php -v on the shell will show you that the PHP version which you are using there is not version 5.6...

Reply to "In update.php : syntax error, unexpected '[' in line 170"