Page 1 of 1

Error to migrate PHP 7 to 8

Posted: 14 Dec 2024, 12:57
by DundeeSR
Hi
I have created a new server, with PHP version 8. The old server had PHP version 7 with Mantis 2.27.0 without any problems. But when migrating to the new server, with PHP version 8 it does not let me create issues, it gives me an error:
INTERNAL APPLICATION ERROR
Please use the "Back" button in your web browser to return to the previous page. There you can correct whatever problems were identified in this error or select another action. You can also click an option from the menu bar to go directly to a new section.
It does the same thing when I try to see any issue. I understand that it is because some configuration of the database has changed.
Whenever I have migrated it has been with:
mysqldump and then restore with mysql,
And it has never given me any problems, not even when moving from version 1 to 2.
What could be the error?, since the error that appears is not very descriptive.

Re: Error to migrate PHP 7 to 8

Posted: 14 Dec 2024, 15:33
by cas
add the following 2 lines to your config/config_inc.php:

Code: Select all

$g_show_detailed_errors = ON;
$g_display_errors = array(E_ALL);
Now try again, you may get a more understandable error message.

Re: Error to migrate PHP 7 to 8

Posted: 15 Dec 2024, 10:13
by DundeeSR
Hi.

This is de Error:

INTERNAL APPLICATION ERROR

Unknown named parameter $bug_id

Please use the "Back" button in your web browser to return to the previous page. There you can correct whatever problems were identified in this error or select another action. You can also click an option from the menu bar to go directly to a new section.
Detailed error information
Full path: /var/www/mantis/core/error_api.php
Line number: 95
Stack trace
# Filename Line Class Type Function Args
0 /var/www/mantis/core/event_api.php 302 - - event_callback -
1 /var/www/mantis/core/event_api.php 175 - - event_type_chain -
2 /var/www/mantis/core/email_api.php 1614 - - event_signal -
3 /var/www/mantis/core/print_api.php 1730 - - email_build_subject -
4 /var/www/mantis/core/print_api.php 234 - - print_email_link_with_subject -
5 /var/www/mantis/bug_view_inc.php 301 - - print_user_with_subject -
6 /var/www/mantis/view.php 36 - - include <string>'/var/www/mantis/bug_view_inc.php'

Regards

Re: Error to migrate PHP 7 to 8

Posted: 15 Dec 2024, 12:43
by cas
Looks like a plugin might be involved here. Which ones do you have activated?
Can you try to deactivate all non-standard plugins and see if that helps?
If so, you can activate one by one again , hopefully to find the one giving the issue.

Re: Error to migrate PHP 7 to 8

Posted: 16 Dec 2024, 09:08
by DundeeSR
Hi

Correct. The bug is a plugin. The plugin is called CustomizeEmailSubject (https://github.com/mantisbt-plugins/Cus ... ailSubject). This was reported on Github three weeks ago.

Thanks for the help.

Re: Error to migrate PHP 7 to 8

Posted: 23 Jan 2025, 11:46
by dregad
Root cause is in Mantis - see https://mantisbt.org/bugs/view.php?id=35255