Hi!
I just updated to last Hesk version 4.0.1 (as we are using Office 365 we need it with OAuth...)
Ubuntu 18
PHP 7.0.33
My issue is on uploaded files;
PHP handle the size of 30G /file and max 6 files (in php.ini)
When I upload a file now for example 3G; I see it in TEMP directory at normal size... then the server is taking a long when the user submitting the ticket; it the TEMP file into the attachments folder (very long time)
The size of the file is correct in the attachments folder but when the user downloads it from the ticket; it's MAX 2G !
I did not have this issue before; and our support needs large files...
Can you help me?
Thanks a lot!
MAX SIZE of attachement limit at 2G on last Hesk version
Moderator: mkoch227
Re: MAX SIZE of attachement limit at 2G on last Hesk version
What are your values for these settings in your php.ini?
Then you can also try this if it helps:
1. download and install Notepad++ (or use another powerful text editor; do NOT use Microsoft Notepad)
2. open file /inc/attachments.inc.php
3. find this code (line 259):
and change it to
4. save, upload to the server, and test
Test first with a file < 4GB, then with a file > 4GB
Code: Select all
max_execution_time
max_input_time
upload_max_filesize
post_max_size
1. download and install Notepad++ (or use another powerful text editor; do NOT use Microsoft Notepad)
2. open file /inc/attachments.inc.php
3. find this code (line 259):
Code: Select all
if (hesk_copy($hesk_settings['temp_server_path'].$old_name, $hesk_settings['server_path'].$new_name)) {
hesk_unlink($hesk_settings['temp_server_path'].$old_name);
}
Code: Select all
rename($hesk_settings['temp_server_path'].$old_name, $hesk_settings['server_path'].$new_name);
Test first with a file < 4GB, then with a file > 4GB
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Re: MAX SIZE of attachement limit at 2G on last Hesk version
Thanks; I tested it
with the modification; when a client upload a file; the server file transfer from the TEMP to the attachments directory is very quick so it's much faster to submit an answer under Hesk (good point). Can I let this version on the production server?
But the size is still limited to 2,09Go when I download it from the link under Hesk GUI
The size of the file (3,13Go) in the attachment directory is good; same as the original file
here the php.ini (version 7.0 used by apache2)
/etc/php/7.0/apache2/php.ini:
max_execution_time = 4000 (so 66minutes; it does not take this time...)
max_input_time = -1
post_max_size = 0
file_uploads = On
upload_tmp_dir = /home/XYZ/TMP/
upload_max_filesize = 30G
max_file_uploads = 10
post_max_size = 300G
/etc/php/7.0/apache2$ php -v
PHP 7.0.33-62+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Sep 18 2022 10:19:50) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.0.33-62+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2017, by Zend Technologies
Thanks a lot for your help =)
with the modification; when a client upload a file; the server file transfer from the TEMP to the attachments directory is very quick so it's much faster to submit an answer under Hesk (good point). Can I let this version on the production server?
But the size is still limited to 2,09Go when I download it from the link under Hesk GUI
The size of the file (3,13Go) in the attachment directory is good; same as the original file
here the php.ini (version 7.0 used by apache2)
/etc/php/7.0/apache2/php.ini:
max_execution_time = 4000 (so 66minutes; it does not take this time...)
max_input_time = -1
post_max_size = 0
file_uploads = On
upload_tmp_dir = /home/XYZ/TMP/
upload_max_filesize = 30G
max_file_uploads = 10
post_max_size = 300G
/etc/php/7.0/apache2$ php -v
PHP 7.0.33-62+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Sep 18 2022 10:19:50) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.0.33-62+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2017, by Zend Technologies
Thanks a lot for your help =)
Re: MAX SIZE of attachement limit at 2G on last Hesk version
Yes, that is safe for the production server.
Not sure what is happening on your server that downloads stop at 2.09 GB, a limit must be reached. Make sure you use 64-bit operating system and software versions, 32-bit systems are usually limited to 2GB physical memory. The way download_attachments.php file handles downloads hasn't changed for 10+ years so it's not something that would be caused by the new version of Hesk.
Not sure what is happening on your server that downloads stop at 2.09 GB, a limit must be reached. Make sure you use 64-bit operating system and software versions, 32-bit systems are usually limited to 2GB physical memory. The way download_attachments.php file handles downloads hasn't changed for 10+ years so it's not something that would be caused by the new version of Hesk.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools