Problem when try migration

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
emata
Posts: 6
Joined: 26 Apr 2021, 01:54

Problem when try migration

Post by emata »

Hi, I am having trouble trying to migrate Mantis 1.2.12 to 2.24.4.

I backed up database (mysql 5) in source computer and restored in new (mysql 8).
I downloaded Mantis 2.24.4 in new computer and extracted.
I copied config_inc.php from old to new computer, as stated in Admin Guide, and modified variables to match new environment (e.g. database host).
I made configurations on DNS and Apache so I can reach the new mantis from a browser (database, old Mantis, new Mantis and browser are different computers).
I go to http://newsite/admin/install.php -- Everything "GOOD".
I write admin credentials of database in section "Upgrade Options".
I press "Install / Upgrade Database" - The browser shows a login page, with a message saying that the database seems to be not updated and a link to update.
I clic the link, and the browser shows again the install page. I write admin credentials of database again, press "Intall / Upgrade", which goes to login page again, and so on in an infinite loop.

I written in config_inc.php:
$g_log_level = LOG_DATABASE ;
for logging database events, but I see each time in output file:

*****************************************************************

26-Apr-2021 15:50 -03 DB config_api.php:728 config_cache_all() array (
0 => 'SELECT config_id, user_id, project_id, type, value, access_reqd FROM mantis_config_table',
1 => '0.0005',
)
26-Apr-2021 15:50 -03 DB install_helper_functions_api.php:709 install_check_config_serialization() array (
0 => 'SELECT * FROM mantis_config_table WHERE type=3',
1 => '0.0006',
)
26-Apr-2021 15:50 -03 DB authentication_api.php:1096 auth_get_current_user_id() array (
0 => 'SELECT id FROM mantis_user_table WHERE cookie_string=\'\'',
1 => '0.0005',
)
26-Apr-2021 15:50 -03 DB database_api.php:161 db_connect() array (
0 => 'SET NAMES UTF8',
1 => '0.0004',
)
26-Apr-2021 15:50 -03 DB plugin_api.php:935 plugin_register_installed() array (
0 => 'SELECT basename, priority, protected FROM mantis_plugin_table WHERE enabled=\'1\' ORDER BY priority DESC',
1 => '0.0007',
)
26-Apr-2021 15:50 -03 DB config_api.php:728 config_cache_all() array (
0 => 'SELECT config_id, user_id, project_id, type, value, access_reqd FROM mantis_config_table',
1 => '0.0006',
)
26-Apr-2021 15:50 -03 DB user_api.php:704 user_get_id_by_name() array (
0 => 'SELECT * FROM mantis_user_table WHERE username=\'administrator\'',
1 => '0.0008',
)

*****************************************************************

Can you help me?
Any help appreciated.

Thanks!
cas
Posts: 1586
Joined: 11 Mar 2006, 16:08
Contact:

Re: Problem when try migration

Post by cas »

Think you need to verify the credentials used.
Which login screen , do you get , from Mantis?
Are the credentials of the database correct in config_inc.php?
Did you copy config_inc.php to correct location so inside the config directory?
emata
Posts: 6
Joined: 26 Apr 2021, 01:54

Re: Problem when try migration

Post by emata »

Hi, thanks for your response!

I have checked the credentials, I am sure they are right. When I purposedly write wrong credentials, I got error screen.
I have copied copied config_inc.php in config folder of new installation.
I attach the screens that go in infinite loop.

I apppreciate any other suggestion...

Regards.
Attachments
login.png
login.png (62.63 KiB) Viewed 3523 times
check.png
check.png (76.89 KiB) Viewed 3523 times
cas
Posts: 1586
Joined: 11 Mar 2006, 16:08
Contact:

Re: Problem when try migration

Post by cas »

This sounds indeed quite strange.
I would suggest to start from scratch using the latest version of Mantis
emata
Posts: 6
Joined: 26 Apr 2021, 01:54

Re: Problem when try migration

Post by emata »

Hi, thanks again for your response.

I don't understand what you mean by "starting from scratch"...
I did as scratch as I could...new server for (Apache - PHP - Mantis) and new server for mysql 8.
I can't start from zero the cases, because we have been years using Mantis, so we need to migrate old Mantis to the new one.
So I backed up current database and restored on new mysql server, installed latest version of Mantis on new server, and followed instructions of Admin Guide.
Sincerely I am stuck, I don't know what else I can do, because I don't see errors in logs that could lead me on what is going wrong.
Maybe there is some log I am not seeing?

Thank you very much.
emata
Posts: 6
Joined: 26 Apr 2021, 01:54

Re: Problem when try migration

Post by emata »

Now I am trying to migrate in steps, so I downloaded Mantis version 1.3.20 and point to the same database restored on mysql8 (and copied config_ing.php and changed values to match new database, as before)
When I click Install, now I get the result I attach in screenshot.
Everything seems fine, until "Schema step 193: UpdateFunction ( check_config_serialization ). There, there is no "GOOD" or "FAIL"... just an empty field.

Another fact: If I choose the option of writing statements instead of performing installation, I obtain steps:

***************************************
Database Creation Suppressed, SQL Queries follow

stored_filter_migrate;

;

stored_filter_migrate;

;

ALTER TABLE mantis_user_table MODIFY COLUMN password VARCHAR(64) NOT NULL DEFAULT '';

(etc.)

***************************************

But when I try to install performin steps, and I see structure of table "mantis_user_table", column "password" is varchar(32)...as if the ALTER TABLE was not being executed....

Some ideas? Thanks!
install.png
install.png (69.04 KiB) Viewed 3496 times
cas
Posts: 1586
Joined: 11 Mar 2006, 16:08
Contact:

Re: Problem when try migration

Post by cas »

which PHP version are you using?
Why not use 2.25?
emata
Posts: 6
Joined: 26 Apr 2021, 01:54

Re: Problem when try migration

Post by emata »

Hi, thanks for your response.

Finally the problem was that I didn't have installed json module for PHP !

As I didn't find anything in the logs, I debugged by inserting lines in install.php and called php's, and sending them to a text file. After a while, I saw the debug stopped at a call to json_encode(). With a dummy php program called in the server, I saw I didn' have that function installed.
Installed php-json, and all started to work.

Regards.
Post Reply