Page 1 of 1

[SOLVED] MANTIS 2.25.8 KO on Fedora 38 - Incorrect MIME type ?

Posted: 17 Oct 2023, 14:32
by Emy*21
Hello,

I'm having trouble installing MantisBT 2.25.8 on Fedora 38 (remote server), I guess, linked to the error:
The resource at the address "https://monSite.com/admin/install.php" has been blocked due to an incorrect MIME type ("text/html") (X-Content-Type-Options: nosniff).
Server configurations :
• Fedora 38 Linux
• PHP 8.2.11 (cli)
• Zend Engine v4.2.11v(with Zend OPcache v8.2.11)
• Apache/2.4.57
• OpenSSL/3.0.9
• Mysql 8.0.34 (for Linux on x86_64)

Mantisbt 2.25.8 downloaded, unzipped, renamed and positioned under /var/www/html/mantisbt:
1_Mantis_PB.png
1_Mantis_PB.png (6.87 KiB) Viewed 14224 times

Several sites are hosted on this server. Each has its own Apache configuration file.
For Mantis, we have the file « monSite.com.conf », on « /etc/httpd/sites-available », containing:

Code: Select all

<VirtualHost *:80> 
	ServerName monSite.com
	Redirect permanent / https://monSite.com
</VirtualHost>

<VirtualHost *:443>
	ServerName monSite.com
	ServerAdmin no-reply@monSite.com
	ServerAlias www.monSite.com
	DocumentRoot /var/www/html/mantisbt

	SSLEngine On
	SSLProtocol All -SSLv2 -SSLv3
	SSLCompression Off

	<Directory /var/www/html/mantisbt>
	        Options Indexes FollowSymLinks
	        AllowOverride All
        	Require all granted
	</Directory>

	SSLCertificateFile [myCode]
	SSLCertificateKeyFile [myCode]
	SSLCertificateChainFile [myCode]
		
	LogLevel warn
	ErrorLog /var/log/httpd/monSite_com_error.log
	CustomLog /var/log/httpd/monSite_com_custom.log combined
</VirtualHost>
The installation page seems to display correctly, but when we open the details in the development console, we find several errors:
3_Mantis_PB.png
3_Mantis_PB.png (85.26 KiB) Viewed 14224 times
• I don’t understand why I have the request « GET https://monSite.com/css/admin/install.php » but after, we have correct redirections.
• I have modified the Apache configuration file several times to try to remove the error:
The resource at the address "https://monSite.com/admin/install.php" has been blocked due to an incorrect MIME type ("text/html") (X-Content-Type-Options: nosniff).
But it’s always there.

When I fill in the installation options and clic on to the "Install/Update" step, everything goes smoothly until the step « Attempting to connect to database as user » (I try manual connection : it's ok):
4_Mantis_PB.png
4_Mantis_PB.png (79.27 KiB) Viewed 14224 times


Then the installation stops. The database isn't populated, we don't have the configuration files...

Do you know what could be causing these problems in my Apache configuration? Or is it linked to another problem?

Thank you for your help :D

Re: MANTIS 2.25.8 KO on Fedora 38 - Incorrect MIME type ?

Posted: 17 Oct 2023, 15:15
by atrol
I didn't have a deeper look, but guess the problem is caused by the PHP version you are using.
PHP 8.2 is currently not supported, see https://mantisbt.org/bugs/view.php?id=32027
It's planned for version 2.26.0, that might be released soon.

Re: MANTIS 2.25.8 KO on Fedora 38 - Incorrect MIME type ?

Posted: 19 Oct 2023, 08:08
by Emy*21
Hello,

Thank you very much for your answer.

Unfortunately, even with PHP 8.0.30, I have the same problem :
10_Mantis_PB.png
10_Mantis_PB.png (87.33 KiB) Viewed 14169 times
I try to complete all informations and click on "Install/Update" button:
11_Mantis_PB.png
11_Mantis_PB.png (60.94 KiB) Viewed 14169 times
Have you an other idea?

Thank you for your help :D

Re: MANTIS 2.25.8 KO on Fedora 38 - Incorrect MIME type ?

Posted: 19 Oct 2023, 08:57
by atrol
Concerning the "INTERNAL APPLICATION ERROR".
There should be some more information in your web server and / or php log files about that.

Re: MANTIS 2.25.8 KO on Fedora 38 - Incorrect MIME type ?

Posted: 19 Oct 2023, 09:25
by Emy*21
Yes, in PHP 8.0.30 logs, I have:
20_Mantis_PB.png
20_Mantis_PB.png (18.48 KiB) Viewed 14160 times
I have "mysqli" and "mysqlnd" modules on PHP 8.0.30.

No error on Apache's log

Re: MANTIS 2.25.8 KO on Fedora 38 - Incorrect MIME type ?

Posted: 20 Oct 2023, 07:18
by Emy*21
Hello,

Do you think this error could be linked to my MySQL version?

On my server, I have MySQL 8.0.34. Is it too high version for Mantis?

On Mantis documentation, it's "MySQL 5.6 or later" recommanded => "later" means in maximum?

Thank you for your help :-)

Re: MANTIS 2.25.8 KO on Fedora 38 - Incorrect MIME type ?

Posted: 20 Oct 2023, 08:20
by atrol
Sorry, not that much time at the moment to have a deeper look.

MySQL 8.0.34 should not be the problem, I am running exactly this version on a Ubuntu test system. (but didn't try a fresh install of 2.25.8, running latest code on it)

BTW, did you download 2.25.8 from Sourceforge, or did you clone the repository from Github?

Re: MANTIS 2.25.8 KO on Fedora 38 - Incorrect MIME type ?

Posted: 20 Oct 2023, 08:49
by Emy*21
Hello,

No problem, I understand. Thank you for your help.

I download 2.25.8 from Sourceforge.

On my server, with root user, I launched the command lines:

Code: Select all

$ cd /var/www/html 
$ wget https://sourceforge.net/projects/mantisbt/files/mantis-stable/2.25.8/mantisbt-2.25.8.tar.gz
$ tar xvf mantisbt-2.25.8.tar.gz
$ mv mantisbt-2.25.8 mantisbt
$ sudo chown -R apache:apache /var/www/html/
$ sudo chmod -R 755 /var/www/html/mantisbt
After, I configured Apache and I started Mantis installation.

Re: MANTIS 2.25.8 KO on Fedora 38 - Incorrect MIME type ?

Posted: 06 Nov 2023, 09:55
by Emy*21
Hello,

Do you have any other ideas that might help me with this installation problem?

Thank you for your help :-)

Re: MANTIS 2.25.8 KO on Fedora 38 - Incorrect MIME type ?

Posted: 06 Nov 2023, 20:29
by atrol
Sorry, but I had no time to write what I tried about two weeks ago
- installed a fresh Fedora 38 on a virtual system (never did it before, I am not experienced in Fedora)
- setup standard LAMP system offered by Fedora 38, which means MariaDB (10.5.22), Apache, PHP (8.2.12)
- installed MantisBT developer version (pre-release) 2.26.0 under /var/www/html (no HTTPS setup, no additional etc/httpd/sites-available)

I did not get any error during installation.
The main differences I see compared to your installation is, that I used MariaDB and I did not configure a VirtualHost.

Meanwhile MantisBT 2.26.0 that comes with official PHP 8.2 support is released, see viewtopic.php?t=28818
I don't expect that MantisBT 2.26.0 fixes your issue (who knows ...), but searching for issues in 2.25.8 that might be fixed in 2.26.0 is a bit waste of time.
So I recommend to try in a first step MantisBT 2.26.0 without HTTPS and without a VirtualHost configuration.

[SOLVED] Re: MANTIS 2.25.8 KO on Fedora 38 - Incorrect MIME type ?

Posted: 08 Nov 2023, 10:46
by Emy*21
Hello,

Thank you very very much for your help and your attention.

On my Fedora 38, I have :
- Rename old Mantis folder
- Download and extract Mantis BT 2.26.0
- Delete the PHP 8.0 configuration on my Apache configuration, in order to use PHP 8.2
- Restart Apache
- Start de Mantis installation
It's DONE !!! => "Installation complete = GOOD" :mrgreen:

My problem is solved.

Thank you so much :D