Can't install OJS 3.1.1-4 on PHP 7.2.10-0ubuntu0.18.04.1 (MariaDB)

I have just installed fresh server using this tutorial https://www.howtoforge.com/tutorial/perfect-server-ubuntu-18.04-with-apache-php-myqsl-pureftpd-bind-postfix-doveot-and-ispconfig and when I tried to install latest OJS i got WSOD and error 500. I have tried to migrate my OJS 3.0.1 installation but without success (I get wsod on index.php and if I want to upgrade, on upgrade page).
Installing using CLi gave this error:

PHP Fatal error:  Uncaught Error: Call to undefined function mysql_connect() in /var/www/clients/client0/web2/web/lib/pkp/lib/adodb/drivers/adodb-mysql.inc.php:456
Stack trace:
#0 /var/www/clients/client0/web2/web/lib/pkp/lib/adodb/adodb.inc.php(558): ADODB_mysql->_connect('localhost', 'c0403', 'Teodor2018.NsSk...', 'c0test')
#1 /var/www/clients/client0/web2/web/lib/pkp/classes/db/DBConnection.inc.php(144): ADOConnection->Connect('localhost', 'c0403', 'Teodor2018.NsSk...', 'c0test', false)
#2 /var/www/clients/client0/web2/web/lib/pkp/classes/db/DBConnection.inc.php(119): DBConnection->connect()
#3 /var/www/clients/client0/web2/web/lib/pkp/classes/db/DBConnection.inc.php(106): DBConnection->initConn()
#4 /var/www/clients/client0/web2/web/lib/pkp/classes/db/DBConnection.inc.php(55): DBConnection->initCustomDBConnection('mysql', 'localhost', 'c0403', 'Teodor2018.NsSk...', 'c0test', false, false)
#5 /var/www/clients/client0/web2/web/lib/pkp/classes/install/PKPInstall.inc.php(76): DBConnection->__construct('mysql', 'localhost', 'c0 in /var/www/clients/client0/web2/web/lib/pkp/lib/adodb/drivers/adodb-mysql.inc.php on line 456 web2/web/lib/pkp/lib/adodb/drivers/adodb-mysql.inc.php on line 456

and error.log:

[Mon Oct 15 13:12:28.822421 2018] [fcgid:warn] [pid 11282] [client 192.168.129.89:60344] mod_fcgid: stderr: PHP Warning:  Declaration of PKPUsageEventPlugin::getEnabled() should be compatible with LazyLoadPlugin::getEnabled($contextId = NULL) in /var/www/clients/client0/web2/web/lib/pkp/plugins/generic/usageEvent/PKPUsageEventPlugin.inc.php on line 0
[Mon Oct 15 13:12:29.045792 2018] [fcgid:warn] [pid 11282] [client 192.168.129.89:60344] mod_fcgid: stderr: PHP Warning:  Declaration of PKPUsageEventPlugin::getEnabled() should be compatible with LazyLoadPlugin::getEnabled($contextId = NULL) in /var/www/clients/client0/web2/web/lib/pkp/plugins/generic/usageEvent/PKPUsageEventPlugin.inc.php on line 0
[Mon Oct 15 13:12:29.045814 2018] [fcgid:warn] [pid 11282] [client 192.168.129.89:60344] mod_fcgid: stderr: PHP Warning:  Declaration of InstallHandler::validate($request) should be compatible with PKPHandler::validate($requiredContexts = NULL, $request = NULL) in /var/www/clients/client0/web2/web/lib/pkp/pages/install/InstallHandler.inc.php on line 0
[Mon Oct 15 13:12:29.636291 2018] [fcgid:warn] [pid 11281] [client 192.168.129.89:60345] mod_fcgid: stderr: PHP Warning:  Declaration of PKPUsageEventPlugin::getEnabled() should be compatible with LazyLoadPlugin::getEnabled($contextId = NULL) in /var/www/clients/client0/web2/web/lib/pkp/plugins/generic/usageEvent/PKPUsageEventPlugin.inc.php on line 0, referer: http://test2.ff.uns.ac.rs/index.php/index/install
[Mon Oct 15 13:12:29.854435 2018] [fcgid:warn] [pid 11284] [client 192.168.129.89:60346] mod_fcgid: stderr: PHP Warning:  Declaration of PKPUsageEventPlugin::getEnabled() should be compatible with LazyLoadPlugin::getEnabled($contextId = NULL) in /var/www/clients/client0/web2/web/lib/pkp/plugins/generic/usageEvent/PKPUsageEventPlugin.inc.php on line 0, referer: http://test2.ff.uns.ac.rs/index.php/index/install
[Mon Oct 15 13:12:29.854473 2018] [fcgid:warn] [pid 11284] [client 192.168.129.89:60346] mod_fcgid: stderr: PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /var/www/clients/client0/web2/web/cache/t_compile/e8ea13aa559bf8604ca823015b397a28d8666486^%%8B^8BC^8BC56207%%usernav.tpl.php on line 100, referer: http://test2.ff.uns.ac.rs/index.php/index/install
[Mon Oct 15 13:14:10.361176 2018] [fcgid:warn] [pid 11293] [client 192.168.129.89:60387] mod_fcgid: stderr: PHP Warning:  Declaration of PKPUsageEventPlugin::getEnabled() should be compatible with LazyLoadPlugin::getEnabled($contextId = NULL) in /var/www/clients/client0/web2/web/lib/pkp/plugins/generic/usageEvent/PKPUsageEventPlugin.inc.php on line 0, referer: http://test2.ff.uns.ac.rs/index.php/index/install
[Mon Oct 15 13:14:10.361220 2018] [fcgid:warn] [pid 11293] [client 192.168.129.89:60387] mod_fcgid: stderr: PHP Warning:  Declaration of InstallHandler::validate($request) should be compatible with PKPHandler::validate($requiredContexts = NULL, $request = NULL) in /var/www/clients/client0/web2/web/lib/pkp/pages/install/InstallHandler.inc.php on line 0, referer: http://test2.ff.uns.ac.rs/index.php/index/install
[Mon Oct 15 13:14:10.598114 2018] [fcgid:warn] [pid 11284] [client 192.168.129.89:60388] mod_fcgid: stderr: PHP Warning:  Declaration of PKPUsageEventPlugin::getEnabled() should be compatible with LazyLoadPlugin::getEnabled($contextId = NULL) in /var/www/clients/client0/web2/web/lib/pkp/plugins/generic/usageEvent/PKPUsageEventPlugin.inc.php on line 0, referer: http://test2.ff.uns.ac.rs/index.php/index/install/install
[Mon Oct 15 13:14:10.794525 2018] [fcgid:warn] [pid 16781] [client 192.168.129.89:60390] mod_fcgid: stderr: PHP Warning:  Declaration of PKPUsageEventPlugin::getEnabled() should be compatible with LazyLoadPlugin::getEnabled($contextId = NULL) in /var/www/clients/client0/web2/web/lib/pkp/plugins/generic/usageEvent/PKPUsageEventPlugin.inc.php on line 0, referer: http://test2.ff.uns.ac.rs/index.php/index/install/install
[Mon Oct 15 13:14:10.794561 2018] [fcgid:warn] [pid 16781] [client 192.168.129.89:60390] mod_fcgid: stderr: PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /var/www/clients/client0/web2/web/cache/t_compile/e8ea13aa559bf8604ca823015b397a28d8666486^%%8B^8BC^8BC56207%%usernav.tpl.php on line 100, referer: http://test2.ff.uns.ac.rs/index.php/index/install/install
[Mon Oct 15 13:14:25.055351 2018] [fcgid:warn] [pid 16826] [client 192.168.129.89:60396] mod_fcgid: stderr: PHP Warning:  Declaration of PKPUsageEventPlugin::getEnabled() should be compatible with LazyLoadPlugin::getEnabled($contextId = NULL) in /var/www/clients/client0/web2/web/lib/pkp/plugins/generic/usageEvent/PKPUsageEventPlugin.inc.php on line 0, referer: http://test2.ff.uns.ac.rs/index.php/index/install/install
[Mon Oct 15 13:14:25.055396 2018] [fcgid:warn] [pid 16826] [client 192.168.129.89:60396] mod_fcgid: stderr: PHP Warning:  Declaration of InstallHandler::validate($request) should be compatible with PKPHandler::validate($requiredContexts = NULL, $request = NULL) in /var/www/clients/client0/web2/web/lib/pkp/pages/install/InstallHandler.inc.php on line 0, referer: http://test2.ff.uns.ac.rs/index.php/index/install/install
[Mon Oct 15 13:14:25.270871 2018] [fcgid:warn] [pid 11281] [client 192.168.129.89:60397] mod_fcgid: stderr: PHP Warning:  Declaration of PKPUsageEventPlugin::getEnabled() should be compatible with LazyLoadPlugin::getEnabled($contextId = NULL) in /var/www/clients/client0/web2/web/lib/pkp/plugins/generic/usageEvent/PKPUsageEventPlugin.inc.php on line 0, referer: http://test2.ff.uns.ac.rs/index.php/index/install/install
[Mon Oct 15 13:14:25.478061 2018] [fcgid:warn] [pid 16784] [client 192.168.129.89:60400] mod_fcgid: stderr: PHP Warning:  Declaration of PKPUsageEventPlugin::getEnabled() should be compatible with LazyLoadPlugin::getEnabled($contextId = NULL) in /var/www/clients/client0/web2/web/lib/pkp/plugins/generic/usageEvent/PKPUsageEventPlugin.inc.php on line 0, referer: http://test2.ff.uns.ac.rs/index.php/index/install/install
[Mon Oct 15 13:14:25.478093 2018] [fcgid:warn] [pid 16784] [client 192.168.129.89:60400] mod_fcgid: stderr: PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /var/www/clients/client0/web2/web/cache/t_compile/e8ea13aa559bf8604ca823015b397a28d8666486^%%8B^8BC^8BC56207%%usernav.tpl.php on line 100, referer: http://test2.ff.uns.ac.rs/index.php/index/install/install
[Mon Oct 15 13:15:51.470709 2018] [fcgid:warn] [pid 16783] [client 192.168.129.89:60423] mod_fcgid: stderr: PHP Warning:  Declaration of PKPUsageEventPlugin::getEnabled() should be compatible with LazyLoadPlugin::getEnabled($contextId = NULL) in /var/www/clients/client0/web2/web/lib/pkp/plugins/generic/usageEvent/PKPUsageEventPlugin.inc.php on line 0, referer: http://test2.ff.uns.ac.rs/index.php/index/install/install
[Mon Oct 15 13:15:51.470750 2018] [fcgid:warn] [pid 16783] [client 192.168.129.89:60423] mod_fcgid: stderr: PHP Warning:  Declaration of InstallHandler::validate($request) should be compatible with PKPHandler::validate($requiredContexts = NULL, $request = NULL) in /var/www/clients/client0/web2/web/lib/pkp/pages/install/InstallHandler.inc.php on line 0, referer: http://test2.ff.uns.ac.rs/index.php/index/install/install
[Mon Oct 15 13:15:51.470754 2018] [fcgid:warn] [pid 16783] [client 192.168.129.89:60423] mod_fcgid: stderr: PHP Fatal error:  Uncaught Error: Call to undefined function mysql_connect() in /var/www/clients/client0/web2/web/lib/pkp/lib/adodb/drivers/adodb-mysql.inc.php:456, referer: http://test2.ff.uns.ac.rs/index.php/index/install/install
[Mon Oct 15 13:15:51.470757 2018] [fcgid:warn] [pid 16783] [client 192.168.129.89:60423] mod_fcgid: stderr: Stack trace:, referer: http://test2.ff.uns.ac.rs/index.php/index/install/install
[Mon Oct 15 13:15:51.470760 2018] [fcgid:warn] [pid 16783] [client 192.168.129.89:60423] mod_fcgid: stderr: #0 /var/www/clients/client0/web2/web/lib/pkp/lib/adodb/adodb.inc.php(558): ADODB_mysql->_connect('localhost', 'c0403', 'Teodor2018.NsSk...', ''), referer: http://test2.ff.uns.ac.rs/index.php/index/install/install
[Mon Oct 15 13:15:51.470762 2018] [fcgid:warn] [pid 16783] [client 192.168.129.89:60423] mod_fcgid: stderr: #1 /var/www/clients/client0/web2/web/lib/pkp/classes/db/DBConnection.inc.php(144): ADOConnection->Connect('localhost', 'c0403', 'Teodor2018.NsSk...', NULL, false), referer: http://test2.ff.uns.ac.rs/index.php/index/install/install
[Mon Oct 15 13:15:51.470774 2018] [fcgid:warn] [pid 16783] [client 192.168.129.89:60423] mod_fcgid: stderr: #2 /var/www/clients/client0/web2/web/lib/pkp/classes/db/DBConnection.inc.php(119): DBConnection->connect(), referer: http://test2.ff.uns.ac.rs/index.php/index/install/install
[Mon Oct 15 13:15:51.470776 2018] [fcgid:warn] [pid 16783] [client 192.168.129.89:60423] mod_fcgid: stderr: #3 /var/www/clients/client0/web2/web/lib/pkp/classes/db/DBConnection.inc.php(106): DBConnection->initConn(), referer: http://test2.ff.uns.ac.rs/index.php/index/install/install
[Mon Oct 15 13:15:51.470779 2018] [fcgid:warn] [pid 16783] [client 192.168.129.89:60423] mod_fcgid: stderr: #4 /var/www/clients/client0/web2/web/lib/pkp/classes/db/DBConnection.inc.php(55): DBConnection->initCustomDBConnection('mysql', 'localhost', 'c0403', 'Teodor2018.NsSk...', NULL, false, 'utf8'), referer: http://test2.ff.uns.ac.rs/index.php/index/install/install
[Mon Oct 15 13:15:51.470781 2018] [fcgid:warn] [pid 16783] [client 192.168.129.89:60423] mod_fcgid: stderr: #5 /var/www/clients/client0/web2/web/lib/pkp/classes/install/PKPInstall.inc.php(76): DBConnection->__construct('mysql', 'localhost', 'c0403', 'Teodor in /var/www/clients/client0/web2/web/lib/pkp/lib/adodb/drivers/adodb-mysql.inc.php on line 456, referer: http://test2.ff.uns.ac.rs/index.php/index/install/install
[Mon Oct 15 13:16:06.283770 2018] [fcgid:warn] [pid 11284] [client 192.168.129.89:60431] mod_fcgid: stderr: PHP Warning:  Declaration of PKPUsageEventPlugin::getEnabled() should be compatible with LazyLoadPlugin::getEnabled($contextId = NULL) in /var/www/clients/client0/web2/web/lib/pkp/plugins/generic/usageEvent/PKPUsageEventPlugin.inc.php on line 0, referer: http://test2.ff.uns.ac.rs/index.php/index/install/install
[Mon Oct 15 13:16:06.283802 2018] [fcgid:warn] [pid 11284] [client 192.168.129.89:60431] mod_fcgid: stderr: PHP Warning:  Declaration of InstallHandler::validate($request) should be compatible with PKPHandler::validate($requiredContexts = NULL, $request = NULL) in /var/www/clients/client0/web2/web/lib/pkp/pages/install/InstallHandler.inc.php on line 0, referer: http://test2.ff.uns.ac.rs/index.php/index/install/install
[Mon Oct 15 13:16:06.283806 2018] [fcgid:warn] [pid 11284] [client 192.168.129.89:60431] mod_fcgid: stderr: PHP Fatal error:  Uncaught Error: Call to undefined function mysql_connect() in /var/www/clients/client0/web2/web/lib/pkp/lib/adodb/drivers/adodb-mysql.inc.php:456, referer: http://test2.ff.uns.ac.rs/index.php/index/install/install
[Mon Oct 15 13:16:06.283809 2018] [fcgid:warn] [pid 11284] [client 192.168.129.89:60431] mod_fcgid: stderr: Stack trace:, referer: http://test2.ff.uns.ac.rs/index.php/index/install/install
[Mon Oct 15 13:16:06.283811 2018] [fcgid:warn] [pid 11284] [client 192.168.129.89:60431] mod_fcgid: stderr: #0 /var/www/clients/client0/web2/web/lib/pkp/lib/adodb/adodb.inc.php(558): ADODB_mysql->_connect('localhost', 'c0403', 'Teodor2018.NsSk...', ''), referer: http://test2.ff.uns.ac.rs/index.php/index/install/install
[Mon Oct 15 13:16:06.283814 2018] [fcgid:warn] [pid 11284] [client 192.168.129.89:60431] mod_fcgid: stderr: #1 /var/www/clients/client0/web2/web/lib/pkp/classes/db/DBConnection.inc.php(144): ADOConnection->Connect('localhost', 'c0403', 'Teodor2018.NsSk...', NULL, false), referer: http://test2.ff.uns.ac.rs/index.php/index/install/install
[Mon Oct 15 13:16:06.283816 2018] [fcgid:warn] [pid 11284] [client 192.168.129.89:60431] mod_fcgid: stderr: #2 /var/www/clients/client0/web2/web/lib/pkp/classes/db/DBConnection.inc.php(119): DBConnection->connect(), referer: http://test2.ff.uns.ac.rs/index.php/index/install/install
[Mon Oct 15 13:16:06.283818 2018] [fcgid:warn] [pid 11284] [client 192.168.129.89:60431] mod_fcgid: stderr: #3 /var/www/clients/client0/web2/web/lib/pkp/classes/db/DBConnection.inc.php(106): DBConnection->initConn(), referer: http://test2.ff.uns.ac.rs/index.php/index/install/install
[Mon Oct 15 13:16:06.283831 2018] [fcgid:warn] [pid 11284] [client 192.168.129.89:60431] mod_fcgid: stderr: #4 /var/www/clients/client0/web2/web/lib/pkp/classes/db/DBConnection.inc.php(55): DBConnection->initCustomDBConnection('mysql', 'localhost', 'c0403', 'Teodor2018.NsSk...', NULL, false, 'utf8'), referer: http://test2.ff.uns.ac.rs/index.php/index/install/install
[Mon Oct 15 13:16:06.283834 2018] [fcgid:warn] [pid 11284] [client 192.168.129.89:60431] mod_fcgid: stderr: #5 /var/www/clients/client0/web2/web/lib/pkp/classes/install/PKPInstall.inc.php(76): DBConnection->__construct('mysql', 'localhost', 'c0403', 'Teodor in /var/www/clients/client0/web2/web/lib/pkp/lib/adodb/drivers/adodb-mysql.inc.php on line 456, referer: http://test2.ff.uns.ac.rs/index.php/index/install/install
[Mon Oct 15 13:24:27.388376 2018] [fcgid:warn] [pid 16827] [client 192.168.129.89:60600] mod_fcgid: stderr: PHP Warning:  Declaration of PKPUsageEventPlugin::getEnabled() should be compatible with LazyLoadPlugin::getEnabled($contextId = NULL) in /var/www/clients/client0/web2/web/lib/pkp/plugins/generic/usageEvent/PKPUsageEventPlugin.inc.php on line 0
[Mon Oct 15 13:24:27.388411 2018] [fcgid:warn] [pid 16827] [client 192.168.129.89:60600] mod_fcgid: stderr: PHP Warning:  Declaration of InstallHandler::validate($request) should be compatible with PKPHandler::validate($requiredContexts = NULL, $request = NULL) in /var/www/clients/client0/web2/web/lib/pkp/pages/install/InstallHandler.inc.php on line 0
[Mon Oct 15 13:24:27.964857 2018] [fcgid:warn] [pid 16827] [client 192.168.129.89:60600] mod_fcgid: stderr: PHP Warning:  Declaration of PKPUsageEventPlugin::getEnabled() should be compatible with LazyLoadPlugin::getEnabled($contextId = NULL) in /var/www/clients/client0/web2/web/lib/pkp/plugins/generic/usageEvent/PKPUsageEventPlugin.inc.php on line 0, referer: http://test2.ff.uns.ac.rs/index.php/index/install
[Mon Oct 15 13:24:27.964900 2018] [fcgid:warn] [pid 16827] [client 192.168.129.89:60600] mod_fcgid: stderr: PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /var/www/clients/client0/web2/web/cache/t_compile/e8ea13aa559bf8604ca823015b397a28d8666486^%%8B^8BC^8BC56207%%usernav.tpl.php on line 100, referer: http://test2.ff.uns.ac.rs/index.php/index/install

have you tried changing the db connection in config.inc.php to mysqli (instead of mysql)?

1 Like

@ajnyga
Thank you very much, that solved problem (I knew that it was easier solution than installing additional php version :slight_smile: ).

1 Like

Many thanks! This helps with OJS 3.1.2 installation !