Installing OMP (error)

The following error messages are received when installing OMP. In the forum I had seen that you also had to handle this error. Can you give us a hint how we can fix the error? We are using OMP 3.1.2-4.

root@ojs1:/var/www/ojs1b# php tools/install.php
PHP Warning: Declaration of InstallForm::execute() should be compatible with Form::execute(…$functionArgs) in /var/www/ojs1b/lib/pkp/classes/install/form/ on line 20
PHP Fatal error: Uncaught Error: Call to a member function getVersionString() on null in /var/www/ojs1b/lib/pkp/classes/file/
Stack trace:
#0 /var/www/ojs1b/lib/pkp/classes/xml/ FileWrapper::wrapper(‘lib/pkp/registr…’)
#1 /var/www/ojs1b/lib/pkp/classes/db/ XMLParser->parseStruct(‘lib/pkp/registr…’, Array)
#2 /var/www/ojs1b/lib/pkp/classes/i18n/ XMLDAO->parseStruct(‘lib/pkp/registr…’, Array)
#3 /var/www/ojs1b/lib/pkp/classes/cache/ TimeZoneDAO->_timeZoneCacheMiss(Object(FileCache), NULL)
#4 /var/www/ojs1b/lib/pkp/classes/cache/ GenericCache->get(NULL)
#5 /var/www/ojs1b/lib/pkp/classes/i18n/ FileCache->getContents()
#6 /var/www/ojs1b/lib/pkp/classes/i18n/ TimeZoneDAO->getTimeZones()
#7 /var/www/ojs1b/lib/pkp/classes/i18n/ PKPLocale::getTimeZone()
#8 /var/www/ojs1b/lib/pkp/classes/cliTool/ PKPLocale: in /var/www/ojs1b/lib/pkp/classes/file/ on line 145

PHP Parse error: syntax error, unexpected ‘?’, expecting variable (T_VARIABLE) in /var/www/ojs1b/lib/pkp/classes/notification/ on line 373

Hi @ubtr,

The last message suggests that your PHP is too old – try running php --version to double check what version you’re using (assuming the message comes from your command line PHP, that is).

Alec Smecher
Public Knowledge Project Team

Hello @asmecher !
Distributor ID: Ubuntu
Description: Ubuntu 18.04.3 LTS
Release: 18.04
Codename: bionic


PHP 7.4.1 (cli) (built: Dec 18 2019 14:44:22) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.1, Copyright (c), by Zend Technologies

Hi @ubtr,

I’d suggest trying the web-based installer – it’s more commonly used – and if that works where the command-line installer doesn’t, I’ll look into that in more detail.

Please do watch for this error to re-appear:

PHP Parse error: syntax error, unexpected ‘?’, expecting variable (T_VARIABLE) in /var/www/ojs1b/lib/pkp/classes/notification/ on line 373

If it does, I’d suggest creating a PHPInfo page to verify that your web-based PHP interpreter is also PHP 7.4.1 as your command-line PHP reports – it’s possible that you have multiple versions of PHP on your system.

Alec Smecher
Public Knowledge Project Team