Increase the allowed size for uploads

Deployment is made on VM (Ubuntu 18.04.5 live Server amd64) running on QNAP using https://www.apachefriends.org/xampp-files/7.3.26/xampp-linux-x64-7.3.26-0-installer.run and bitnami-orangehrm-4.7-0-module-linux-x64-installer.run

PIM I want to add certain attachments for employees and it says now “Accepts up to 1MB” files.
I’ve read https://docs.bitnami.com/installer/apps/orangehrm/administration/increase-upload-limit-php/
It says “Modify the following options in the installdir/php/etc/php.ini” - is install dir in my case to be /opt/lampp? If yes I have only:
/opt/lampp/php$ ls
man
no /etc

Only one php.ini is here
/opt/lampp/etc

But it says:
post_max_size=40M
upload_max_filesize=40M

Even larger than written in instructions.

Did I look for incorrect php.ini? If yes please advise.

Hi @tsoifun,

thanks for using Bitnami. The installdir is the path you installed OrangeHRM, Did you install OrangeHRM in /opt/lampp or this is the installdir of Xampp?

Regards,
Ibone.

OrangeHRM was installed by bitnami-orangehrm-4.7-0-module-linux-x64-installer.run and it did not show any progress where it was installed to - only questions if lampps installed and password. Nothing else so I have no idea what is the installdir fir this module.

Hi @tsoifun,

This is the guide you need to follow https://docs.bitnami.com/installer/infrastructure/lamp/administration/increase-upload-limit-phpmyadmin/

Regards,
Ibone.

Approach A: Bitnami Installations Using System Packages
Modify the following options in the php.ini file:
And where is this php.ini?
I have only one php.ini located /opt/lampp/etc but it has already 40M max sizes but still not possible to upload anything over 1MB

Hi @tsoifun,

We have a Support Tool that will gather relevant information for us to analyze your configuration and logs. Could you please execute it on the machine where the stack is running by following the steps described in the guide below?

Regards,
Ibone.

OK, I will try but if there is ONLY ONE php.ini what’s the point to look at the structure? I have made another VM on Ubuntu 18.04 and the same story - only ONE php.ini which has 40M maxfiles etc but it is not possible to upload any file larger of 1MB.

Hi @tsoifun

Thanks! This tool will create a report that allows us to check your configuration and reproduce/solve your issue. Could you please run it and provide with the ID?

Best regards,
Jose Antonio Carmona


Was my answer helpful? Click on :heart:

I have tried with you prebuilt VM - the result is that I cannot upload file over 1MB.
Have not you increased on you VM?

Ran it, ID : 3702dafa-115a-c9f2-fd8b-061f02949920

Hi @tsoifun

I have checked your configuration and the PHP upload size params seems to be correctly set. However, OrangeHRM performs upload size validation at application level, see:

https://help.orangehrm.com/hc/en-us/articles/360008061234-What-is-the-maximum-attachment-size-I-am-allowed-to-attach-in-OrangeHRM-FAQ-#:~:text=By%20default%2C%20OrangeHRM%20offers%20you,10%20MB%20for%20onsite%20customers.

Unfortunately, changing the params in the php.ini file won’t make any difference. What is your use case, what are you trying to upload?

Best regards,
Jose Antonio Carmona


Was my answer helpful? Click on :heart:

I need to upload files which will be at least 3-4MB - CVs, copies of passport etc.
Linke here https://docs.bitnami.com/installer/apps/orangehrm/administration/increase-upload-limit-php/ does not say anything that even if you increase OrangeHRM will not allow to upload largen of 1MB files. But their link you sent says that new version allows to upload upto 5MB which would be fine for me. Do you have new image of BITNAMI which will be possible to upgrade and make things working?
Thank you.

Hi!

Thanks for your feedback. Indeed the link increases the limit for PHP, but OrangeHRM itself is setting a custom limit internally. Maybe we can update the documentation mentioning that, I will let the doc team know about it, thanks!

But their link you sent says that new version allows to upload upto 5MB which would be fine for me

I have checked and our newest version does come with the same limit by default, so I guess they are referring to some other services.

Hence, I believe you can modify this setting directly in the application code or by reaching out to them for further support on how to do it.

Best regards,
Jose Antonio Carmona


Was my answer helpful? Click on :heart:

As I understand from the installation file “bitnami-orangehrm-4.7-0-linux-x64-installer.run” your latest is 4.7 version while they mentioned that with version 5 the limit has been increased to 5MB

https://help.orangehrm.com/hc/en-us/articles/900003325806-Product-Overview-of-New-Features-6-5-18-Video- - as far as I understand they have released two months ago the version 6.5

Or 6.5.18 in their video does not mean that this version has been released? Sorry get lost already with them…their support does not answer

Hi @tsoifun

your latest is 4.7 version while they mentioned that with version 5 the limit has been increased to 5MB

Checking the link again, I missed this information you mention:

Note: 6.5 Release - The maximum size of an attachment is now increased to 5 MB by default in this release and onward.

as far as I understand they have released two months ago the version 6.5
Or 6.5.18 in their video does not mean that this version has been released?

As far as I know, OrangeHRM offers an open-source, professional, & enterprise product tier. Bitnami packs the open-source version of the product, whose latest release is 4.7 as of today:

https://github.com/orangehrm/orangehrm/releases

The version mentioned in the video does more than likely refer to one of the other two versions of this product.

Best regards,
Jose Antonio Carmona


Was my answer helpful? Click on :heart:

So it means that no chances for open-source to increase the size of attachments - ?

Hi @tsoifun

I have been checking the source code files and it seems the size limit is hardcoded in them. Modifying those values there would increase the limit, but please bear in mind that this is something I have not tested and you may proceed at your own risk.

$ cat /opt/bitnami/orangehrm/symfony/plugins/orangehrmPimPlugin/lib/form/EmployeeAttachmentForm.php | grep "Attachment Size Exceeded"
   'max_size'=>1000000), array('max_size' => __('Attachment Size Exceeded'))),

$ cat /opt/bitnami/orangehrm/symfony/plugins/orangehrmRecruitmentPlugin/lib/form/RecruitmentAttachmentForm.php | grep "Attachment Size Exceeded"
   'max_size' => 1024000), array('max_size' => __('Attachment Size Exceeded.'))),

Best regards,
Jose Antonio Carmona


Was my answer helpful? Click on :heart:

Found those forms located in docker (strange but two passes were given), changed to higher figures - no go, still the same “max file exceeded”