Unable to update MediaWiki: syntax error, unexpected 'class' (T_CLASS)

Created:

2017-01-13 20:10:50 UTC

Modified:

2017-08-08 13:41:15 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Unable to update MediaWiki: syntax error, unexpected 'class' (T_CLASS)

Applicable to:

  • Plesk for Windows

Symptoms

Unable to update MediaWiki to the latest version:

  • The following error message is shown in Plesk:
    Updating an installation of MediaWiki 1.23.14-77 for example.com has failed: Non-zero exit status returned by script. Output stream: 'PHP Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in C:\Program Files (x86)\Parallels\Plesk\var\apspackages\aps1EE9.tmp.zipa3b4530d-52d3-6116-5c\cache\scripts\configure on line 188 at (SiteApplicationManager::fsaExecuteScript line 448) at execute console command --run-application-script(vconsoleapp::start line 100) at execute "C:\Program Files (x86)\Parallels\Plesk\admin\bin\sappmng.exe" --run-application-script "--script-filename=configure" "--fsa-xml-file=C:/Program Files (x86)/Parallels/Plesk/PrivateTemp/fsa2E32.tmp" "--script-name=upgrade" "--user-name=johndoe" "--application-full-name=file:///C:\Program Files (x86)\Parallels\Plesk\var\apspackages\aps1EE9.tmp.zipa3b4530d-52d3-6116-5c\cache"(vconsoleapp::run line 117) (Error code 1)'. Error stream: 'PHP Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in C:\Program Files (x86)\Parallels\Plesk\var\apspackages\aps1EE9.tmp.zipa3b4530d-52d3-6116-5c\cache\scripts\configure on line 188 at (SiteApplicationManager::fsaExecuteScript line 448) at execute console command --run-application-script(vconsoleapp::start line 100) at execute "C:\Program Files (x86)\Parallels\Plesk\admin\bin\sappmng.exe" --run-application-script "--script-filename=configure" "--fsa-xml-file=C:/Program Files (x86)/Parallels/Plesk/PrivateTemp/fsa2E32.tmp" "--script-name=upgrade" "--user-name=johndoe" "--application-full-name=file:///C:\Program Files (x86)\Parallels\Plesk\var\apspackages\aps1EE9.tmp.zipa3b4530d-52d3-6116-5c\cache"(vconsoleapp::run line 117) (Error code 1)'. 
  • MediaWiki 1.23.14 is installed.

Cause

Unsupported PHP version is set for domain.

Requirements for the latest version of MediaWiki 1.28.0 (release 83) :

  • PHP 5.5.9 or later
  • The PHP safe mode is off
  • The PHP memory limit must be at least 50M bytes.
  • The app requires a mysql database (mysql 5.0.2).

Resolution

Change PHP version to 5.6.x or later at Plesk > Domains > example.com > PHP Settings .

Have more questions? Submit a request
Please sign in to leave a comment.