Koozali.org: home of the SME Server

Download Ticket Service - Change Upload Quota (PHP)

Offline ghorst352

  • *****
  • 180
  • +0/-0
Download Ticket Service - Change Upload Quota (PHP)
« on: April 09, 2015, 01:15:53 PM »
I am trying to figure out how to change the upload max file size from 1GB to 10GB within Download Ticket Service which according to the directions comes directly from the configuration within the PHP.ini file.  However, this appears to be incorrect as somehow within my php.ini file is set at 200MB but when I send an upload grant to an outside user they are able to send up to a 1GB file so there must be another location from which this is receiving its configuration.?

Coming directly from theorg's website (http://www.thregr.org/~wavexx/software/dl/README.html), here are the instructions for modifying the quota:

The maximal upload limit is determined by several PHP configuration parameters. Check your php.ini for:

    file_uploads: must be “On”.
    upload_tmp_dir: ensure enough space is available.
    upload_max_filesize: change as needed.
    post_max_size: must be at least 1M larger than upload_max_filesize.
    session.gc_maxlifetime: must be long enough to allow large uploads to finish.

The upload limit as shown in the submission form is determined automatically from the upload_max_filesize parameter.



Here are my php.ini parameters:

file_uploads: on
upload_tmp_dir:
upload_max_filesize: 200M
post_max_size: 200M
session.gc_maxlifetime: 1440


This is all fine and dandy because you would think ok will let me change my php.ini file by applying the sme template to the php.ini.  Here is what I did and it does not work.

mkdir -p /etc/e-smith/templates-custom/etc/php.ini
nano /etc/e-smith/templates-custom/etc/php.ini/60FileUploads

file_uploads                           = On
upload_max_filesize                    = {
    my $mf = $php{UploadMaxFilesize} || "5120M";   <-----------My change
    $OUT .= "$mf";
}

cp /etc/e-smith/templates/etc/php.ini/60FileUploads /etc/e-smith/templates-custom/etc/php.ini
expand-template /etc/php.ini
service httpd-e-smith restart

After this i check the php.ini file and its unchanged.  What am I doing wrong here and does anybody think perhaps there is another location from which the quota is being set?

Any Help is appreciated...



Offline Daniel B.

  • *
  • 1,700
  • +0/-0
    • Firewall Services, la sécurité des réseaux
Re: Download Ticket Service - Change Upload Quota (PHP)
« Reply #1 on: April 09, 2015, 01:33:19 PM »
No custom-template is required, the contrib has a setting for this

Code: [Select]
db configuration setprop dl MaxUploadSize 5120
signal-event webapps-update

Note that you probably won't be able to work with files bigger than 2GB on a 32bits system (this is a PHP limitation)
C'est la fin du monde !!! :lol:

Offline ghorst352

  • *****
  • 180
  • +0/-0
Re: Download Ticket Service - Change Upload Quota (PHP)
« Reply #2 on: April 09, 2015, 01:39:05 PM »
Daniel, you nailed it.  Thanks  :-P