View Issue Details

IDProjectCategoryView StatusLast Update
0025770mantisbtupgradepublic2019-06-02 15:53
Reporteruv_jfuchs Assigned Toatrol  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionno change required 
Summary0025770: Update mantis 2.21 can not download/upload attachments
Description

Hello,
I migrate from Ubuntu 12.04 Server with mantis 1.2.19, mysql 5.5.54 and PHP 5.3.10 to an new centos 7.6 server with mantis 2.21, MariaDB 5.5.60 and PHP 7.3.5.
I do a mysqldump from the old one and put it into the new DB. After that I run the Updte script /admin/install.php.
Everythings works fine.
The only Problem I have is that nobody can upload ord download files.
My config:
$g_file_upload_method = 'DISK';
$g_absolute_path_default_upload_folder = '/var/www/html/mantis-files';

I see in the database that there is an old path to th file (/srv/p1mantis/mantis/mantis-files/) . I also copy the file to this path but I also get ann HTTP-Error 400 whne I try to download the file.

Steps To Reproduce

Update from system

TagsNo tags attached.

Activities

uv_jfuchs

uv_jfuchs

2019-05-21 11:03

reporter   ~0062107

Hi,
i fixed the problem.
On the old server with PHP5 the file_upload_method was in quotes.
$g_file_upload_method = 'DISK';
On the new server with PHP7.3.5 it only works without quotes.
$g_file_upload_method = DISK;

Why did the admin/check script dont check this settings?

atrol

atrol

2019-05-21 12:38

developer   ~0062108

Thanks @uv_jfuchs for telling the solution.

Why did the admin/check script dont check this settings?

To have a check in admin/check is a good idea, but keep in mind that $g_file_upload_method is just one of hundreds of options that could be set wrong in some way.

DISK is documented at various places as the correct setting, e.g.
https://mantisbt.org/docs/master/en-US/Admin_Guide/html-desktop/#admin.config.uploads
https://github.com/mantisbt/mantisbt/blob/release-2.21.0/config/config_inc.php.sample#L66
https://github.com/mantisbt/mantisbt/blob/release-2.21.0/config_defaults_inc.php#L1869

I am not sure if it's worth the effort to implement such kind of checks.
Contributions are welcome, you could send us a Pull Request on our Github repository https://github.com/mantisbt/mantisbt