Koozali.org: home of the SME Server

Obsolete Releases => SME 7.x Contribs => Topic started by: imcintyre on January 29, 2008, 11:25:07 PM

Title: Problem adjusting webshare upload limit (SOLVED)
Post by: imcintyre on January 29, 2008, 11:25:07 PM
I've looked through the wiki, the forums, and the bugs to try to fix this problem. The are a number of years old posts that the links don't work anymore. The closest I could get was adjusting the mail size
Quote
Set max email size

Restrict the size of email messages that can pass through your mail server

config setprop qmail MaxMessageSize x
signal-event email-update

where x is in bytes, eg 6000000 = 6 MB

I can upload a 2.65 MB size file but not a 21.5 Mb file. In the example above I used x=30000000.

edit As an experiment I was able to upload 4.8 MB movie, but not a 14.2MB movie.

What did I miss? Thx in advance for your help.
Title: Re: Problem adjusting webshare upload limit
Post by: thomasch on January 30, 2008, 03:27:05 AM
php.ini max upload size ?
Title: Re: Problem adjusting webshare upload limit
Post by: imcintyre on January 30, 2008, 11:24:06 AM
Thx for quick reply and nudge in right direction. I have posted what I did in case that helps anybody else. I have a questions regarding the limits I increased (see details below). Are there any risks associated with having these increased limits, especially the one in my first post.

I figured out previously to your reply that the limit was around 10M. Sure enough this morning I went and checked the logs and found this error after trying to upload a too large file,

Quote
Jan 29 17:56:14 server1 httpd: PHP Warning:  upload_max_filesize of 10485760 bytes exceeded - file [userfile[]=IM000988.MPG] not saved in Unknown on line 0

I made the following changes;
Quote
Jan 29 22:10:02  server1 /sbin/e-smith/db[23729]: /home/e-smith/db/configuration: OLD php=service|AllowUrlFopen|Off|status|enabled
Jan 29 22:10:02 server1 /sbin/e-smith/db[23729]: /home/e-smith/db/configuration: NEW php=service|AllowUrlFopen|Off|UploadMaxFilesize|30M|status|enabled
Jan 29 22:10:36 server1 httpd-e-smith: Restarting httpd-e-smith succeeded
Jan 29 22:10:46 server1 sshd(pam_unix)[23634]: session closed for user root

Now when trying to upload larger file I get this error;
Quote
Jan 29 22:11:34 server1 httpd: PHP Warning:  POST Content-Length of 22384852 bytes exceeds the limit of 20971520 bytes in Unknown on line 0

I made the following changes;
Quote
Jan 30 05:12:41 server1 /sbin/e-smith/db[27440]: /home/e-smith/db/configuration: OLD php=service|AllowUrlFopen|Off|UploadMaxFilesize|30M|status|enabled
Jan 30 05:12:41 server1 /sbin/e-smith/db[27440]: /home/e-smith/db/configuration: NEW php=service|AllowUrlFopen|Off|PostMaxSize|30M|UploadMaxFilesize|30M|status|enabled
Jan 30 05:13:14 server1 httpd-e-smith: Restarting httpd-e-smith succeeded

This allowed me to upload files of up to 30M but not files adding up to more than 30M, i.e. I had 3 files of 20M each that I had to load in separate operations.
Title: Re: Problem adjusting webshare upload limit (SOLVED)
Post by: dmay on January 30, 2008, 11:47:46 PM
There are four relevant php settings to consider:

    MaxExecutionTime=3600
    MemoryLimit=50M
    PostMaxSize=50M
    UploadMaxFilesize=50M

Then you need to expand php.ini and restart httpd-e-smith

Darrell
Title: Re: Problem adjusting webshare upload limit (SOLVED)
Post by: raem on January 31, 2008, 02:43:00 AM
They are all set by db commands, see
http://wiki.contribs.org/index.php?title=SME_Server:Documentation:Technical_Manual:Booklet#Php

db configuration setprop php MaxExecutionTime 3600
db configuration setprop php MemoryLimit 50M
db configuration setprop php PostMaxSize 50M
db configuration setprop php UploadMaxFilesize 50M

expand-template /etc/php.ini
/etc/init.d/httpd-e-smith restart
Title: Re: Problem adjusting webshare upload limit (SOLVED)
Post by: imcintyre on January 31, 2008, 06:32:24 PM
While searching I found this reference in the forums and in dmay's contrib
Quote
Step-by-step silly HowTo for installation of Webshare on a fresh SMEserver 7.1.3.
.

Quote
http://forums.contribs.org/index.php?topic=36433.0
talks about putting this in the wiki.

However there is nothing in the wiki, contrib, or "how to" about that to adjust the file sizes you need to edit the php.ini file.

Was it put in and removed? Let me know I can add it if its helpful

Ian
Title: Re: Problem adjusting webshare upload limit (SOLVED)
Post by: william_syd on January 31, 2008, 10:59:21 PM
Look at the history page to see the changes...

http://wiki.contribs.org/index.php?title=Webshare&action=history

If you think it's useful, put it in.

Use the articles discussion page to debate the issue.
Title: Re: Problem adjusting webshare upload limit (SOLVED)
Post by: raem on February 01, 2008, 02:36:28 AM
imcintyre

Quote
However there is nothing in the wiki, contrib, or "how to" about that to adjust the file sizes you need to edit the php.ini file.

Yes there is, I just quoted it in the previous post.
http://wiki.contribs.org/index.php?title=SME_Server:Documentation:Technical_Manual:Booklet#Php

Title: Re: Problem adjusting webshare upload limit (SOLVED)
Post by: raem on February 01, 2008, 02:39:31 AM
I have updated the Howto with file size info & commands
http://wiki.contribs.org/Webshare