Hello guys
I am in need of some help. I have a MantisBT 2.22.0 instance running on Windows Server 2012 R2 and everything is working fine except file uploads above 30 MB .
This is my config_inc.php file:
# --- Attachments / Upload ---
$ g_allow_file_upload = ON;
$ g_file_upload_method = DISK;
$ g_max_file_size = 2048000000;
$ g_preview_attachments_inline_max_size = 256 * 1024;
# $ g_allowed_files = ''; '
# $ g_disallowed_files = '';
$ g_absolute_path_default_upload_folder = "C: \ inetpub \ wwwroot \ develop \ uploads \ projects \\";
$ upload_tmp_dir = 'C: \ mantis \ tmp \\';
The file upload is working fine if the file is under 30 MB, but I need to upload much larger files.
The permissions seem correct too for the upload folder by project.
Sometimes I receive the following error message while trying to attach a file:
" The server responded with code 0 "
But other times I receive the following message:
" 404 - File or directory not found. The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable. "
My PHP.ini settings is allowing files above 2048 MB to be uploaded and there are no errors or warnings while checking mantisbt / admin / check / index.php.
Does anybody have faced a similar situation?
Thank you!
File Uploading not Working MantisBT 2.22.0 on Windows Server
Moderators: Developer, Contributor
File Uploading not Working MantisBT 2.22.0 on Windows Server
Mantis: 2.22.0
PHP: FastCGI 7.1.29
SQL: 8.0.17.0
OS: Windows Server 2012 R2
Web Server: IIS 6.2
PHP: FastCGI 7.1.29
SQL: 8.0.17.0
OS: Windows Server 2012 R2
Web Server: IIS 6.2
Re: File Uploading not Working MantisBT 2.22.0 on Windows Server
Just to be sure, what is stated in php.ini?
does it look like :
upload_max_filesize=2048M
does it look like :
upload_max_filesize=2048M
Re: File Uploading not Working MantisBT 2.22.0 on Windows Server
My settings are the following:
memory_limit = 2048M
post_max_size = 2048M
upload_max_filesize = 2048M
Mantis: 2.22.0
PHP: FastCGI 7.1.29
SQL: 8.0.17.0
OS: Windows Server 2012 R2
Web Server: IIS 6.2
PHP: FastCGI 7.1.29
SQL: 8.0.17.0
OS: Windows Server 2012 R2
Web Server: IIS 6.2
Re: File Uploading not Working MantisBT 2.22.0 on Windows Server
That at least looks good. How are you connected to the local network, perhaps Wifi times out with very large files?
Is this happening with multiple browsers?
Is this happening with multiple browsers?
-
- Posts: 113
- Joined: 05 Jun 2019, 00:17
Re: File Uploading not Working MantisBT 2.22.0 on Windows Server
DON'T forget to restart apache server after changing php.ini file!
Re: File Uploading not Working MantisBT 2.22.0 on Windows Server
I'm using IIS as webserver. I've restarted the service but no effect until now.
All machines are connected via lan cable and I've tested upload of files though Chrome, Firefox and Opera all of them showing the same result.
Can't upload files above 30 M.
All machines are connected via lan cable and I've tested upload of files though Chrome, Firefox and Opera all of them showing the same result.
Can't upload files above 30 M.
Mantis: 2.22.0
PHP: FastCGI 7.1.29
SQL: 8.0.17.0
OS: Windows Server 2012 R2
Web Server: IIS 6.2
PHP: FastCGI 7.1.29
SQL: 8.0.17.0
OS: Windows Server 2012 R2
Web Server: IIS 6.2
Re: File Uploading not Working MantisBT 2.22.0 on Windows Server
You list 2 php versions. Which one is used and is the corresponding php.ini in line?
Re: File Uploading not Working MantisBT 2.22.0 on Windows Server
Our MantisBT instance is running in a server with PHP 7.1.29.
Mantis: 2.22.0
PHP: FastCGI 7.1.29
SQL: 8.0.17.0
OS: Windows Server 2012 R2
Web Server: IIS 6.2
PHP: FastCGI 7.1.29
SQL: 8.0.17.0
OS: Windows Server 2012 R2
Web Server: IIS 6.2
Re: File Uploading not Working MantisBT 2.22.0 on Windows Server
After sometime searching for a fix to my situation, I've discovered that IIS has a specific setting "maxAllowedContentLength" which was causing my issue.
I have been able to fix this though this powershell command:
Thank you again to all of you guys!
I have been able to fix this though this powershell command:
Code: Select all
Set-WebConfigurationProperty -filter /system.webserver/security/requestfiltering/requestLimits -name maxAllowedContentLength -value 134217728
Mantis: 2.22.0
PHP: FastCGI 7.1.29
SQL: 8.0.17.0
OS: Windows Server 2012 R2
Web Server: IIS 6.2
PHP: FastCGI 7.1.29
SQL: 8.0.17.0
OS: Windows Server 2012 R2
Web Server: IIS 6.2
Re: File Uploading not Working MantisBT 2.22.0 on Windows Server
Thanks for posting the fix, can be useful or others too