"Call to undefined function mysql_connect()" and blank page after upgrading to OJS 3.1.2

ojs3

#1

After upgrading from 3.1.1-4 to 3.1.2 I got a blank page: http://ojs.acmfccapixaba.org.br/

This is what I get at error_log every time I try to load to visit the home page:

[16-Mar-2019 20:03:06 Etc/GMT] PHP Deprecated:  Methods with the same name as their class will not be constructors in a future version of PHP; ADODB_Cache_File has a deprecated constructor in /home/HOSTINGUSERNAME/public_html/ojs.acmfccapixaba.org.br/lib/pkp/lib/adodb/adodb.inc.php on line 263
[16-Mar-2019 20:03:06 Etc/GMT] PHP Deprecated:  Methods with the same name as their class will not be constructors in a future version of PHP; ADOConnection has a deprecated constructor in /home/HOSTINGUSERNAME/public_html/ojs.acmfccapixaba.org.br/lib/pkp/lib/adodb/adodb.inc.php on line 359
[16-Mar-2019 20:03:06 Etc/GMT] PHP Deprecated:  Methods with the same name as their class will not be constructors in a future version of PHP; ADORecordSet has a deprecated constructor in /home/HOSTINGUSERNAME/public_html/ojs.acmfccapixaba.org.br/lib/pkp/lib/adodb/adodb.inc.php on line 2921
[16-Mar-2019 20:03:06 Etc/GMT] PHP Deprecated:  Methods with the same name as their class will not be constructors in a future version of PHP; ADORecordSet_array has a deprecated constructor in /home/HOSTINGUSERNAME/public_html/ojs.acmfccapixaba.org.br/lib/pkp/lib/adodb/adodb.inc.php on line 3939
[16-Mar-2019 20:03:06 Etc/GMT] PHP Fatal error:  Uncaught Error: Call to undefined function mysql_connect() in /home/HOSTINGUSERNAME/public_html/ojs.acmfccapixaba.org.br/lib/pkp/lib/adodb/drivers/adodb-mysql.inc.php:456
Stack trace:
#0 /home/HOSTINGUSERNAME/public_html/ojs.acmfccapixaba.org.br/lib/pkp/lib/adodb/adodb.inc.php(558): ADODB_mysql->_connect('localhost', 'MYSQLUSERNAME', 'PASSWORD', 'MYSQLDATABASE')
#1 /home/HOSTINGUSERNAME/public_html/ojs.acmfccapixaba.org.br/lib/pkp/classes/db/DBConnection.inc.php(151): ADOConnection->Connect('localhost', 'MYSQLUSERNAME', 'PASSWORD', 'MYSQLDATABASE', false)
#2 /home/HOSTINGUSERNAME/public_html/ojs.acmfccapixaba.org.br/lib/pkp/classes/db/DBConnection.inc.php(126): DBConnection->connect()
#3 /home/HOSTINGUSERNAME/public_html/ojs.acmfccapixaba.org.br/lib/pkp/classes/db/DBConnection.inc.php(83): DBConnection->initConn()
#4 /home/HOSTINGUSERNAME/public_html/ojs.acmfccapixaba.org.br/lib/pkp/classes/db/DBConnection.inc.php(52): DBConnection->initDefaultDBConnection()
#5 /home/HOSTINGUSERNAME/public_html/ojs.acmfccapixaba.org.br/lib/pkp/classes/db/DBConnection.inc.php(22 in /home/HOSTINGUSERNAME/public_html/ojs.acmfccapixaba.org.br/lib/pkp/lib/adodb/drivers/adodb-mysql.inc.php on line 456
$ mysql --version
mysql  Ver 14.14 Distrib 5.5.61-38.13, for Linux (x86_64) using readline 5.1
$ php --version
PHP 7.1.18 (cli) (built: May 28 2018 03:43:03) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
[leonaepr@md-27 ~]$ php -m       
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
gmp
hash
iconv
imagick
imap
json
libxml
mbstring
mcrypt
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
readline
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
sqlite3
standard
tokenizer
wddx
xml
xmlreader
xmlrpc
xmlwriter
xsl
zip
zlib

[Zend Modules]

Any idea of what is wrong?

Thanks in advance!


#2

in config.inc.php change mysql to mysqli. https://github.com/pkp/ojs/blob/master/config.TEMPLATE.inc.php#L131


#3

Thank you very much!

How do I know if the database was correctly updated?


#4

if your site is working now, you can go to Administration > System Information

It should show the current db version.


#5

Thank you. Indeed, the “Current version” was 3.1.1.4, and after a database update it bumped to 3.1.2.