PHP8 Upgrade from 7 Results In Internal Error

General discussion of Mantis.

Moderators: Developer, Contributor

Post Reply
randomjake
Posts: 2
Joined: 03 Oct 2022, 18:05

PHP8 Upgrade from 7 Results In Internal Error

Post by randomjake »

On RH8, fully updated, I upgraded my PHP to 8.0.13 from 7.4 in support of our mantisbt 2.25.5 installation.

Login to Mantis works.
Posting a bug works.
Updating a bug results in the "Internal Server Error" message page, but the update is successful and email is sent and slack notifications work.
Deleting a bug works.

There's nothing of note in the messages log file and similarly in the httpd/mantis_access_log and httpd/mantis_error_log files.

The access log shows HTTP status 200 on the POST for the update on the bug.

I did notice that the internal error only happens when there is text in the description of the change. For instance, if I change the bug to resolved with no resolution comment - no error. If I change the bug to resolved with a resolution comment - error. Maybe there is a problem with the mbstring module?

php-mbstring.x86_64 8.0.13-3.module+el8.6.0+15725+0c79e7c4 @rhel-8-for-x86_64-appstream-rpms


Any ideas what might be the culprit for the misnomer error page?

I saw this in the php-fpm www-error.log file when I tried to update a bug report:

[03-Oct-2022 11:24:03 America/Los_Angeles] Unknown named parameter $files

mantisbt-2.25.5/core/event_api.php: 232: - - - - event_callback( <string>'EVENT_BUGNOTE_ADD', <string>'bugnote_add_edit', <string>'Slack', <array> { [0] => 20779, [1] => 80332, ['files'] => <array> { } } )

mantisbt-2.25.5/core/event_api.php: 164: - - - - event_type_execute( <string>'EVENT_BUGNOTE_ADD', <array> { ['Slack'] => <array> { [0] => 'bugnote_add_edit' } }, <array> { [0] => 20779, [1] => 80332, ['files'] => <array> { } } )

mantisbt-2.25.5/core/commands/IssueNoteAddCommand.php: 281: - - - - event_signal( <string>'EVENT_BUGNOTE_ADD', <array> { [0] => 20779, [1] => 80332, ['files'] => <array> { } } )

mantisbt-2.25.5/core/commands/Command.php: 137: IssueNoteAddCommand - -> - process()

mantisbt-2.25.5/bugnote_add.php: 64: Command - -> - execute()
atrol
Site Admin
Posts: 8398
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: PHP8 Upgrade from 7 Results In Internal Error

Post by atrol »

Didn't have a deeper look, looks like https://github.com/infojunkie/MantisBT-Slack/issues/58
Upgrading to latest Slack plugin might fix the issue.
Please use Search before posting and read the Manual
randomjake
Posts: 2
Joined: 03 Oct 2022, 18:05

Re: PHP8 Upgrade from 7 Results In Internal Error

Post by randomjake »

Thanks atrol! That seemed to do the trick. Upgrading to version 1.0.3 of the Slack plugin (just copy the files from github master) solved the problem.
atrol
Site Admin
Posts: 8398
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: PHP8 Upgrade from 7 Results In Internal Error

Post by atrol »

Thanks for the feedback. Good to hear it's working.
Please use Search before posting and read the Manual
Post Reply