Error database while installing OJS3 in Centos 7

Hi there,

We are trying to install OJS3 on our Centos7 server, PHP7, MySQL 5.7.21 and php-mysqlnd module.
After setting privileges to the specific folders we open the installation webpage but it shows a database error because it is trying to query the Journals table which doesnt exist yet.

SELECT * FROM journals WHERE path = ‘indexphp’

Just in case we change versions PHP and php-mysqlnd 5.4.16-42.el7 but it didnt make any difference

We would appreciate any help you could give us.

Hello,

Did you choose that database driver is MySQLi? If yes, please post exact error message that you see on the screen.

Thanks

To begin with, requesting homepage of OJS doesnt redirect to “/index.php/index/install” so we have to write it directly in URL

Testing your comment, step by step we tried again the version PHP72 and php72-mysqlnd
We lacked library php-xml:

Call to undefined function xml_parser_create()

After that, his error in the log:

[Mon Mar 12 08:11:44.047727 2018] [php7:error] [pid 29194] [client 81.47.165.45:54856] PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /proeditio/OJS/ojs-3.1.0-1/lib/pkp/lib/adodb/drivers/adodb-mysql.inc.php:456\nStack trace:\n#0 /proeditio/OJS/ojs-3.1.0-1/lib/pkp/lib/adodb/adodb.inc.php(558): ADODB_mysql->_connect('localhost', 'ojs', 'ojs', 'ojs')\n#1 /proeditio/OJS/ojs-3.1.0-1/lib/pkp/classes/db/DBConnection.inc.php(144): ADOConnection->Connect('localhost', 'ojs', 'ojs', 'ojs', false)\n#2 /proeditio/OJS/ojs-3.1.0-1/lib/pkp/classes/db/DBConnection.inc.php(119): DBConnection->connect()\n#3 /proeditio/OJS/ojs-3.1.0-1/lib/pkp/classes/db/DBConnection.inc.php(76): DBConnection->initConn()\n#4 /proeditio/OJS/ojs-3.1.0-1/lib/pkp/classes/db/DBConnection.inc.php(52): DBConnection->initDefaultDBConnection()\n#5 /proeditio/OJS/ojs-3.1.0-1/lib/pkp/classes/db/DBConnection.inc.php(220): DBConnection->__construct()\n#6 /proeditio/OJS/ojs-3.1.0-1/lib/pkp/classes/db/DBConnection.inc.php(231): DBConnection::getInstance()\n#7 /proeditio/OJS/ojs-3.1.0-1/lib/pkp/classes/db/DAO.inc.php(73): DBConnection::getCo in /proeditio/OJS/ojs-3.1.0-1/lib/pkp/lib/adodb/drivers/adodb-mysql.inc.php on line 456

As you told us, we changed the driver to mysqli (although as far as I know it wasnt necessary to change the config file before acceeding installation page) and another error in the log:

_[Mon Mar 12 08:12:52.391342 2018] [php7:warn] [pid 29286] [client 81.47.165.45:54866] PHP Warning:  mysqli_real_escape_string() expects parameter 1 to be mysqli, boolean given in /proeditio/OJS/ojs-3.1.0-1/lib/pkp/lib/adodb/drivers/adodb-mysqli.inc.php on line 227_
_[Mon Mar 12 08:12:52.392802 2018] [php7:warn] [pid 29286] [client 81.47.165.45:54866] PHP Warning:  mysqli_query() expects parameter 1 to be mysqli, boolean given in /proeditio/OJS/ojs-3.1.0-1/lib/pkp/lib/adodb/drivers/adodb-mysqli.inc.php on line 761_
_[Mon Mar 12 08:12:52.392933 2018] [php7:notice] [pid 29286] [client 81.47.165.45:54866] ojs2: DB Error: Access denied for user 'ojs'@'localhost' (using password: YES)_

And debug the error message in the webpage:

_(mysqli): SELECT * FROM journals WHERE path = ''   Query: SELECT * FROM journals WHERE path = '' failed. Access denied for user 'ojs'@'localhost' (using password: YES)_
_1045: Access denied for user 'ojs'@'localhost' (using password: YES)_
_                                    ADOConnection._Execute(SELECT * FROM journals WHERE path = '') % line 1032, file: adodb.inc.php_
_                                 ADOConnection.Execute(SELECT * FROM journals WHERE path = '', Array[1]) % line  100, file: DAO.inc.php_
_                              DAO.retrieve(SELECT * FROM journals WHERE path = ?, indexphp) % line  143, file: ContextDAO.inc.php_
_                           ContextDAO.getByPath(indexphp) % line  233, file: PKPRouter.inc.php_
_                        PKPRouter.getContext(Object:Request, 1) % line  878, file: PKPRequest.inc.php_
_DB Error: Access denied for user 'ojs'@'localhost' (using password: YES)_

Before installation page, php is trying to reach the database we dont know why.