juanmackie's picture

Hi there

Could you advise how best to adjust the max_upload size for the SNIPE-IT back up file. The default is 8mb but my backup file is 80mb

Forum: 
Jeremy Davis's picture

Hi Juan,

You'll need to update the PHP settings - in the php.ini file. The exact location will depend on which TurnKey (or specifically PHP) version you are using. The path to the file you'll need to edit will be /etc/php/PHP_VERSION_X.Y/apache2/php.ini where PHP_VERSION_X.Y is the PHP version. E.g. with PHP 8.1, it will be /etc/php/8.1/apache2/php.ini

If you'd like more specific instructions, you'll need to share the specific appliance version you are using. If you are unsure, please run:

turnkey-version

And then share the output.

The settings that will need adjustment are (with suggested values to support a 80MB upload with a bit of headroom):

memory_limit = 256M
upload_max_filesize = 100M
post_max_size = 128M

You may also want to adjust these:

max_execution_time = 360
max_input_vars = 1500

They related to other things that may restrict your ability to upload files, although may not be required.

Please note that in the php.ini file, any lines that start with a semi-colon (';') are "commented out" (i.e. ignored), so some of those lines that I suggest changing above, may need to have the leading ';' removed (as well as adjusting the setting) before they will be applied.

After saving those changes, restart Apache:

systemctl restart apache2

Hopefully your upload should now work. If not, please share the TurnKey version and confirm which specific changes you've made.

juanmackie's picture

Big thanks mate. I knew I had to change:

upload_max_filesize = 100M
post_max_size = 128M

 

But missed the other variables. 

 

Much thanks 

Ahmed Sabry's picture

Thank you man but please if you can advice me where do i can find this file because i cannot find it on  shared web hosting cpanel as my snipeit published already and working online
Jeremy Davis's picture

Hi there, this is the TurnKey Linux forums.

Unfortunately, we have no idea about the setup of your shared hosting provider. You possibly don't even have access to these PHP settings in a shared hosting environment. Either way it's probably best to contact your hosting provider. They'll either be able to tell you how/where or perhaps they'll need to do it for you?

Add new comment