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
-
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
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.
-
php.ini max upload size ?
-
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,
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;
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;
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;
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.
-
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
-
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
-
While searching I found this reference in the forums and in dmay's contrib
Step-by-step silly HowTo for installation of Webshare on a fresh SMEserver 7.1.3.
.
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
-
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.
-
imcintyre
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
-
I have updated the Howto with file size info & commands
http://wiki.contribs.org/Webshare