Change the host and domain

Description of issue or problem I’m having:
i changed the host and domain from new host and domain
Home site : white page

What I tried to resolve the issue:
change name and databse and folder “files” path in “config.inc.php”

Application Version - e.g., OJS 3.1.2:
OJS 3.3.0.10
PHP 7.4 (in new host)
php 8.0 (in old host)

Additional information, such as screenshots and error log messages if applicable:
i have this error in log file

#0 xxxxxx/public_html/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(38): PDO->__construct('mysql:host=loca...', 'journalscoeminn...', 'IK+$vKYV6)(-37J', Array)
#1 xxxxxx/public_html/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(67): Doctrine\DBAL\Driver\PDOConnection->__construct('mysql:host=loca...', 'journalscoeminn...', 'IK+$vKYV6)(-37J', Array)
#2 xxxxxx/public_html/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(46): Illuminate\Database\Connectors\Connector->createPdoConnection('mysql:host=loca...', 'journalscoeminn...', 'IK+$vKYV6)(-37J', Array)
#3 xxxxxx/public_html/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php(24): I in xxxxxx/public_html/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php on line 671
[12-Jun-2022 18:14:05 UTC] PHP Warning:  session_start(): Failed to read session data: user (path: /opt/alt/php73/var/lib/php/session) in xxxxxx/public_html/lib/pkp/classes/session/SessionManager.inc.php on line 58
[12-Jun-2022 18:14:05 UTC] PHP Fatal error:  Uncaught PDOException: could not find driver in xxxxxx/public_html/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:38

Hi @rebas_saber

Have you tried to change the current mysql driver you are using? Maybe you are using mysqli and could test switching to mysql .

Best,
Israel

Hi @israel.cefrin

No, where can I change it ?

Hi @rebas_saber

On your config.inc.php file you can switch between mysql and mysqli driver on this line:

Best,
Israel

@israel.cefrin

I checked it by default : mysql
I changed it to mysqli but it doesn’t work

Hi @rebas_saber

If you are still running into the same issue, and since you move your server, could you please run a PHP script only to test the DB connection from your new host?

You have mentioned you migrated to a new server, did you preserve the previous credentials to the DB ?

Best,
Israel

@israel.cefrin

How do I do the test please?

Vs has kept the previous credentials for the database
But the database prefix changes from one server to another, and I changed it also in config.inc.php

@rebas_saber

You can see an example of how testing a DB connection with a PHP script from this URL:
https://www.w3schools.com/php/php_mysql_connect.asp

Best,
Israel

Hi @israel.cefrin

I want to install new ojs, in the new server, but this error appears

capture_1

help please :pray:

Hi @rebas_saber

Another user has experienced the same issue and found the solution. Please check the thread from this link:

Best,
Israel