Page 1 of 1

Problem with upgrade

Posted: 05 Mar 2024, 14:02
by sse450
Hello,

I used MantisBT without any problem in the past. After some idle time (~1 year) wanted to check and saw that home page is not coming up. No matter what I do, It is completely blank.

To solve the problem, tried to upgrade as per the instructions on the Admin Guide. Copied the old installation to somewhere else. Unzipped the new version. Copied old config files to the new. Run admin/install.php script. All checks but one is OK.
Checking URL to installation BAD
Can't retrieve web page at 'https://mantis.xxx.com/'.
When I call the URL directly (without admin/install.php), the page comes up with some warmings:
Warning: "admin" directory should be removed, or access to it restricted.
Warning: "path" was not defined in config_inc.php. Leaving it empty is a security risk, as the path will be set based on headers from the HTTP request, exposing your system to Host Header Injection attacks.
Warning: The database structure may be out of date. Please upgrade here before logging in.
What is wrong with my setup? Appreciate any help.
Thank you.

Info on my setup:
AlmaLinux release 8.9
PHP 8.2.15
Apache 2.4.37
MariaDB 10.3.39

Re: Problem with upgrade

Posted: 05 Mar 2024, 14:24
by atrol
It seems you did not run admin/install.php to upgrade the database, or this step failed.

Re: Problem with upgrade

Posted: 06 Mar 2024, 09:30
by sse450
I can't run admin/install.php. Because, I get
Checking URL to installation BAD
Can't retrieve web page at 'https://mantis.xxx.com/'.

Re: Problem with upgrade

Posted: 06 Mar 2024, 09:59
by atrol
Looks like a bug.
What's your PHP setting of allow-url-fopen? Is it changed from default 1 to another value?
https://www.php.net/manual/en/filesyste ... -url-fopen

As a temporary workaround you could also change line 504 in install.php to

Code: Select all

			$t_hard_fail = false;

Re: Problem with upgrade

Posted: 06 Mar 2024, 13:52
by sse450
Dear atrol,

Checked php settings. It is "On".

Code: Select all

allow_url_fopen = On
Then, updated t_hard_fail in install.php as you advised.

This time It still presented a warning something like "Cannot open https://mantis.xxx.com". However, install.php finished all and I can now access https://mantis.xxx.com without any problem.

By the way, which path is MantisBT referring to in Warning:"path" was not defined in config_inc.php?

Thank you for your help.

Re: Problem with upgrade

Posted: 06 Mar 2024, 14:56
by atrol
Concerning "path" see https://www.mantisbt.org/docs/master/en ... onfig.path
$g_path is set automatically since many years, but to fix an old security related bug, it's now recommened to set the option in config_inc.php.
The warning for this (and the changed installer) was introduced in version 2.26.1.
For more details see https://www.mantisbt.org/bugs/view.php?id=19381

Re: Problem with upgrade

Posted: 07 Mar 2024, 08:04
by sse450
Thank you very much.

Re: Problem with upgrade

Posted: 27 May 2024, 05:41
by AndrewCarsten
sse450 wrote: 07 Mar 2024, 08:04 Thank you very much.
Is that your problem solved sir? I'm have some issue like this.. Please answer me.. Thank you

Re: Problem with upgrade

Posted: 27 May 2024, 05:52
by atrol
What is your problem?
Did you read the documentation and set $g_path?