select the MySQLi driver rather than the MySQL driver in OJS (Open Journal System)

1.7k Views Asked by At

I have this error: PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/epuedu/public_html/journal/epuojs/ojs/lib/pkp/lib/adodb/drivers/adodb-mysql.inc.php:456

After googleing this error on OJS: I found this answer:

If it is PHP 7 you may need to select the MySQLi driver rather than the MySQL driver.

So i understand that PHP7 don't use MYSQL driver any more.

My question: How can swithch OJS connetion to MYSQLi driver?

Thanks

2

There are 2 best solutions below

1
On

I found that I can select the driver from the first page of installing OJS, after choosing User name, password, database details, you can chose MySqli as well.

I hope this answer help others like me.

0
On

Alternatively, if you have access to the config.inc.php go to the database section and update the driver to "mysqli", eg:

;;;;;;;;;;;;;;;;;;;;;
; Database Settings ;
;;;;;;;;;;;;;;;;;;;;;

[database]

driver = mysqli