INTERNAL APPLICATION ERROR for My View and View Issues pages

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
mnemonicator
Posts: 17
Joined: 28 May 2018, 13:56

INTERNAL APPLICATION ERROR for My View and View Issues pages

Post by mnemonicator »

Hello everybody. I am migrating Mantis BT from one hosting to another and have a trouble with 2 pages after migration:
1. My View
2. My Issues

Both display next 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.

Clicking 'Back' didn't show me anything. Other pages looks good, no problem so far.
MantisBT Version: 2.12.0
Schema Version: 209
PHP Version: 7.2.5
Database Driver: mysqli
Database Version, Description: 5.7.22, 5.7.22

OS: Oracle Linux 7.5
next php components are installed

php.x86_64
php-cli.x86_64
php-common.x86_64
php-mbstring.x86_64
php-mysqlnd.x86_64
php-pdo.x86_64

i found only 1 error in apache and looks it's related. Any idea? thank you.

Call to undefined function json_decode()\n/var/www/html/core/custom_function_api.php: 310: - - - - config_get( <string>'view_issues_page_columns', <string>'', <NULL>NULL, <integer>0 )\n/var/www/html/core/helper_api.php: 471: - - - - custom_function_default_get_columns_to_view( <integer>1, <NULL>NULL )\n/var/www/html/core/helper_api.php: 506: - - - - helper_call_custom_function( <string>'get_columns_to_view', <array> { [0] => 1, [1] => NULL } )\n/var/www/html/core/filter_api.php: 3578: - - - - helper_get_columns_to_view( <integer>1 )\n/var/www/html/core/filter_api.php: 1059: - - - - filter_get_visible_sort_properties_array( <array> { ['_version'] => 'v9', ['_view_type'] => 'simple', ['category_id'] => <array> { [0] => '0' }, ['severity'] => <array> { [0] => 0 }, ['status'] => <array> { [0] => 0 }, ['highlight_changed'] => 6, ['reporter_id'] => <array> { [0] => 0 }, ['handler_id'] => <array> { [0] => 126 }, ['project_id'] => <array> { [0] => -3 }, ['resolution'] => <array> { [0] => 0 }, ['build'] => <array> { [0] => '0' }, ['version'] => <array> { [0] => '0' }, ['hide_status'] => <array> { [0] => 80 }, ['monitor_user_id'] => <array> { [0] => 0 }, ['sort'] => 'last_updated', ['dir'] => 'DESC', ['per_page'] => 50, ['match_type'] => 0, ['platform'] => <array> { [0] => '0' }, ['os'] => <array> { [0] => '0' }, ['os_build'] => <array> { [0] => '0' }, ['fixed_in_version'] => <array> { [0] => '0' }, ['target_version'] => <array> { [0] => '0' }, ['profile_id'] => <array> { [0] => 0 }, ['priority'] => <array> { [0] => 0 }, ['note_user_id'] => <array> { [0] => 0 }, ['sticky'] => true, ['filter_by_date'] => false, ['start_month'] => '05', ['end_month'] => '05', ['start_day'] => 1, ['end_day'] => '28', ['start_year'] => '2018', ['end_year'] => '2018', ['filter_by_last_updated_date'] => false, ['last_updated_start_month'] => '05', ['last_updated_end_month'] => '05', ['last_updated_start_day'] => 1, ['last_updated_end_day'] => '28', ['last_updated_start_year'] => '2018', ['last_updated_end_year'] => '2018', ['search'] => '', ['view_state'] => 0, ['tag_string'] => '', ['tag_select'] => 0, ['relationship_type'] => -1, ['relationship_bug'] => 0, ['custom_fields'] => <array> { [2] => <array> { [0] => '0' }, [3] => <array> { [0] => '0' }, [4] => <array> { [0] => '0' }, [5] => <array> { [0] => '0' }, [6] => <array> { [0] => '0' }, [7] => <array> { [0] => '0' }, [8] => <array> { [0] => '0' } } } )\n/var/www/html/core/filter_api.php: 2397: - - - - filter_get_query_sort_data( <array> { ['_version'] => 'v9', ['_view_type'] => 'simple', ['category_id'] => <array> { [0] => '0' }, ['severity'] => <array> { [0] => 0 }, ['status'] => <array> { [0] => 0 }, ['highlight_changed'] => 6, ['reporter_id'] => <array> { [0] => 0 }, ['handler_id'] => <array> { [0] => 126 }, ['project_id'] => <array> { [0] => -3 }, ['resolution'] => <array> { [0] => 0 }, ['build'] => <array> { [0] => '0' }, ['version'] => <array> { [0] => '0' }, ['hide_status'] => <array> { [0] => 80 }, ['monitor_user_id'] => <array> { [0] => 0 }, ['sort'] => 'last_updated', ['dir'] => 'DESC', ['per_page'] => 50, ['match_type'] => 0, ['platform'] => <array> { [0] => '0' }, ['os'] => <array> { [0] => '0' }, ['os_build'] => <array> { [0] => '0' }, ['fixed_in_version'] => <array> { [0] => '0' }, ['target_version'] => <array> { [0] => '0' }, ['profile_id'] => <array> { [0] => 0 }, ['priority'] => <array> { [0] => 0 }, ['note_user_id'] => <array> { [0] => 0 }, ['sticky'] => true, ['filter_by_date'] => false, ['start_month'] => '05', ['end_month'] => '05', ['start_day'] => 1, ['end_day'] => '28', ['start_year'] => '2018', ['end_year'] => '2018', ['filter_by_last_updated_date'] => false, ['last_updated_start_month'] => '05', ['last_updated_end_month'] => '05', ['last_updated_start_day'] => 1, ['last_updated_end_day'] => '28', ['last_updated_start_year'] => '2018', ['last_updated_end_year'] => '2018', ['search'] => '', ['view_state'] => 0, ['tag_string'] => '', ['tag_select'] => 0, ['relationship_type'] => -1, ['relationship_bug'] => 0, ['custom_fields'] => <array> { [2] => <array> { [0] => '0' }, [3] => <array> { [0] => '0' }, [4] => <array> { [0] => '0' }, [5] => <array> { [0] => '0' }, [6] => <array> { [0] => '0' }, [7] => <array> { [0] => '0' }, [8] => <array> { [0] => '0' } } }, <NULL>NULL, <array> { ['select'] => <array> { [0] => '{bug}.*' }, ['from'] => <array> { [0] => '{bug}' }, ['join'] => <array> { [0] => ' JOIN {project} ON {project}.id = {bug}.project_id' }, ['where'] => <array> { [0] => '( {bug}.handler_id=126 )', [1] => '( {bug}.status in (?, ?, ?, ?, ?) )' }, ['where_values'] => <array> { [0] => 1, [1] => 10, [2] => 20, [3] => 30, [4] => 40, [5] => 50 }, ['project_where'] => <array> { [0] => '{project}.enabled = ?' }, ['operator'] => ' AND ', ['metadata'] => <array> { ['user_id'] => 126, ['included_projects'] => <array> { [0] => 11, [1] => 10, [2] => 13, [3] => 14, [4] => 17, [5] => 12, [6] => 1, [7] => 19, [8] => 22, [9] => 18, [10] => 21, [11] => 20 } }, ['order'] => <array> { } } )\n/var/www/html/core/filter_api.php: 1282: - - - - filter_get_bug_rows_query_clauses( <array> { ['_version'] => 'v9', ['_view_type'] => 'simple', ['category_id'] => <array> { [0] => '0' }, ['severity'] => <array> { [0] => 0 }, ['status'] => <array> { [0] => 0 }, ['highlight_changed'] => 6, ['reporter_id'] => <array> { [0] => 0 }, ['handler_id'] => <array> { [0] => 126 }, ['project_id'] => <array> { [0] => -3 }, ['resolution'] => <array> { [0] => 0 }, ['build'] => <array> { [0] => '0' }, ['version'] => <array> { [0] => '0' }, ['hide_status'] => <array> { [0] => 80 }, ['monitor_user_id'] => <array> { [0] => 0 }, ['sort'] => 'last_updated', ['dir'] => 'DESC', ['per_page'] => 50, ['match_type'] => 0, ['platform'] => <array> { [0] => '0' }, ['os'] => <array> { [0] => '0' }, ['os_build'] => <array> { [0] => '0' }, ['fixed_in_version'] => <array> { [0] => '0' }, ['target_version'] => <array> { [0] => '0' }, ['profile_id'] => <array> { [0] => 0 }, ['priority'] => <array> { [0] => 0 }, ['note_user_id'] => <array> { [0] => 0 }, ['sticky'] => true, ['filter_by_date'] => false, ['start_month'] => '05', ['end_month'] => '05', ['start_day'] => 1, ['end_day'] => '28', ['start_year'] => '2018', ['end_year'] => '2018', ['filter_by_last_updated_date'] => false, ['last_updated_start_month'] => '05', ['last_updated_end_month'] => '05', ['last_updated_start_day'] => 1, ['last_updated_end_day'] => '28', ['last_updated_start_year'] => '2018', ['last_updated_end_year'] => '2018', ['search'] => '', ['view_state'] => 0, ['tag_string'] => '', ['tag_select'] => 0, ['relationship_type'] => -1, ['relationship_bug'] => 0, ['custom_fields'] => <array> { [2] => <array> { [0] => '0' }, [3] => <array> { [0] => '0' }, [4] => <array> { [0] => '0' }, [5] => <array> { [0] => '0' }, [6] => <array> { [0] => '0' }, [7] => <array> { [0] => '0' }, [8] => <array> { [0] => '0' } } }, <NULL>NULL, <NULL>NULL, <NULL>NULL )\n/var/www/html/my_view_inc.php: 243: - - - - filter_get_bug_rows( <integer>1, <integer>10, <NULL>NULL, <NULL>NULL, <array> { ['_version'] => 'v9', ['_view_type'] => 'simple', ['category_id'] => <array> { [0] => '0' }, ['severity'] => <array> { [0] => 0 }, ['status'] => <array> { [0] => 0 }, ['highlight_changed'] => 6, ['reporter_id'] => <array> { [0] => 0 }, ['handler_id'] => <array> { [0] => 126 }, ['project_id'] => <array> { [0] => -3 }, ['resolution'] => <array> { [0] => 0 }, ['build'] => <array> { [0] => '0' }, ['version'] => <array> { [0] => '0' }, ['hide_status'] => <array> { [0] => 80 }, ['monitor_user_id'] => <array> { [0] => 0 }, ['sort'] => 'last_updated', ['dir'] => 'DESC', ['per_page'] => 50, ['match_type'] => 0, ['platform'] => <array> { [0] => '0' }, ['os'] => <array> { [0] => '0' }, ['os_build'] => <array> { [0] => '0' }, ['fixed_in_version'] => <array> { [0] => '0' }, ['target_version'] => <array> { [0] => '0' }, ['profile_id'] => <array> { [0] => 0 }, ['priority'] => <array> { [0] => 0 }, ['note_user_id'] => <array> { [0] => 0 }, ['sticky'] => true, ['filter_by_date'] => false, ['start_month'] => '05', ['end_month'] => '05', ['start_day'] => 1, ['e
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: INTERNAL APPLICATION ERROR for My View and View Issues pages

Post by atrol »

mnemonicator wrote: 28 May 2018, 14:10 PHP Version: 7.2.5
I can't recommend PHP 7.2.x at the moment to run Mantis as there are some known issues.
These ones will be fixed in Mantis 2.15.0
https://www.mantisbt.org/bugs/view.php?id=24462
https://www.mantisbt.org/bugs/view.php?id=24470
mnemonicator wrote: 28 May 2018, 14:10 MantisBT Version: 2.12.0
We fixed some PHP 7.2 related issues since this version. You should use latest 2.14.0.

Concerning your current issue, this (Oracle Linux 7.5 should be similar) might help to fix it.
https://stackoverflow.com/questions/459 ... son-encode
Please use Search before posting and read the Manual
mnemonicator
Posts: 17
Joined: 28 May 2018, 13:56

Re: INTERNAL APPLICATION ERROR for My View and View Issues pages

Post by mnemonicator »

Thank you so much!!! installing php-json package fix my problem!
wdolson
Posts: 27
Joined: 28 Jan 2008, 11:15

Re: INTERNAL APPLICATION ERROR for My View and View Issues pages

Post by wdolson »

I'm having the same problem, but I'm on a shared server through a web hosting service. We were using 1.15.0 on another server, but another group in the company needed to update to PHP 7 and that version quit working. When we tried to update to 2.14.0 with PHP 7, we ran into problems there too.

We got the INTERNAL APPLICATION ERROR there so I tried another server and I've run into the same problem. I don't know if they have root access on the other server, but I don't have it on my shared server. How do I install the JSON for PHP7 if my host provider won't do it (I'm assuming they won't though they haven't replied to my tech support request yet)? Is there some work around?
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: INTERNAL APPLICATION ERROR for My View and View Issues pages

Post by atrol »

wdolson wrote: 07 Aug 2018, 02:09 Is there some work around?
There is a workaround, but it would be quite a lot of effort.
Write a library that contains all used JSON functions in PHP and include it in Mantis.

I recommend to change your provider if he is not able / does not want to support this extension.
Please use Search before posting and read the Manual
wdolson
Posts: 27
Joined: 28 Jan 2008, 11:15

Re: INTERNAL APPLICATION ERROR for My View and View Issues pages

Post by wdolson »

I'm a programmer, but mostly C++ in Windows and embedded systems. I can sort of figure out PHP looking it over, but I don't understand it well enough to make anything more than minor tweaks.

Tech support from my host provider said JSON is turned on with PHP. Is the recommended install some kind of patch on top of JSON?
Mophilly
Posts: 66
Joined: 24 Feb 2005, 23:47
Location: California
Contact:

Re: INTERNAL APPLICATION ERROR for My View and View Issues pages

Post by Mophilly »

wdolson wrote: 07 Aug 2018, 02:09When we tried to update to 2.14.0 with PHP 7, we ran into problems there too.
We are in the midst of this as well. We have a number of applications using Postgres 9.6 and want to integrate MantisBT. We upgraded to 2.14 with PHP 7.1, and it raised many errors. We have retreated to PHP 5.6 but there are problems with that as well.

I would very grateful if a resolution can be determined.
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: INTERNAL APPLICATION ERROR for My View and View Issues pages

Post by atrol »

Create a file test.php with the following content and place it in the folder where you have installed Mantis

Code: Select all

<?php
$json = '{"a":1,"b":2}';
var_dump(json_decode($json));
What do you get when running http://<yourMantusURL>/test.php
Please use Search before posting and read the Manual
wdolson
Posts: 27
Joined: 28 Jan 2008, 11:15

Re: INTERNAL APPLICATION ERROR for My View and View Issues pages

Post by wdolson »

atrol wrote: 08 Aug 2018, 17:34 Create a file test.php with the following content and place it in the folder where you have installed Mantis

Code: Select all

<?php
$json = '{"a":1,"b":2}';
var_dump(json_decode($json));
What do you get when running http://<yourMantusURL>/test.php
I get:

object(stdClass)#1 (2) { ["a"]=> int(1) ["b"]=> int(2) }
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: INTERNAL APPLICATION ERROR for My View and View Issues pages

Post by atrol »

You wrote you have the same problem.
To be sure: Do you see the same error in web server logs that was reported by user mnemonicator?

Code: Select all

Call to undefined function json_decode()\n/var/www/html/core/custom_function_api.php: 310 ...
Please use Search before posting and read the Manual
Post Reply