Installing OMP (error)

Hello!
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/InstallForm.inc.php on line 20
PHP Fatal error: Uncaught Error: Call to a member function getVersionString() on null in /var/www/ojs1b/lib/pkp/classes/file/FileWrapper.inc.php:145
Stack trace:
#0 /var/www/ojs1b/lib/pkp/classes/xml/XMLParser.inc.php(214): FileWrapper::wrapper(‘lib/pkp/registr…’)
#1 /var/www/ojs1b/lib/pkp/classes/db/XMLDAO.inc.php(55): XMLParser->parseStruct(‘lib/pkp/registr…’, Array)
#2 /var/www/ojs1b/lib/pkp/classes/i18n/TimeZoneDAO.inc.php(58): XMLDAO->parseStruct(‘lib/pkp/registr…’, Array)
#3 /var/www/ojs1b/lib/pkp/classes/cache/GenericCache.inc.php(63): TimeZoneDAO->_timeZoneCacheMiss(Object(FileCache), NULL)
#4 /var/www/ojs1b/lib/pkp/classes/cache/FileCache.inc.php(115): GenericCache->get(NULL)
#5 /var/www/ojs1b/lib/pkp/classes/i18n/TimeZoneDAO.inc.php(77): FileCache->getContents()
#6 /var/www/ojs1b/lib/pkp/classes/i18n/PKPLocale.inc.php(728): TimeZoneDAO->getTimeZones()
#7 /var/www/ojs1b/lib/pkp/classes/i18n/PKPLocale.inc.php(145): PKPLocale::getTimeZone()
#8 /var/www/ojs1b/lib/pkp/classes/cliTool/CliTool.inc.php(64): PKPLocale: in /var/www/ojs1b/lib/pkp/classes/file/FileWrapper.inc.php on line 145

Apache-error.log:
PHP Parse error: syntax error, unexpected ‘?’, expecting variable (T_VARIABLE) in /var/www/ojs1b/lib/pkp/classes/notification/PKPNotificationOperationManager.inc.php 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).

Regards,
Alec Smecher
Public Knowledge Project Team

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

Php-Version

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/PKPNotificationOperationManager.inc.php 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.

Regards,
Alec Smecher
Public Knowledge Project Team