icon Learn how to get the most out of Surmunity - read our forum tips here! | Welcome! Please register to access all of our features.

» Surpass Web Hosting Forums » Discussions » Email » Email file attachment size contraints and limits

Email General questions, webmail, mailing lists.

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread
Old February 11th, 2008, 10:00 PM   #1 (permalink)
Surpass Fan
Seasoned Poster
 
sandersans's Avatar
 
Joined in Jun 2003
Lives in SoCal
Hosted on Vega
86 posts
Gave thanks: 1
Thanked 0 times
Email file attachment size contraints and limits

For those of you wondering what the file size limit is for attachments in webmail here is what I found out from working with support:

There are 4 components to file size limits all of which are configured through php.ini if your server is running suexec or through .htaccess if your sever is NOT running suexec. These 4 components are simply PHP directives that must be set.

Directives that must be set (the values shown are an example of my congif)
max_execution_time = 120
post_max_size = 25M
upload_max_filesize = 20M

max_execution_time is the number of seconds a script is allowed to run on the server before timing out. This is important for larger files as it can take a bit of time to upload to the server.

post_max_size is the maximum POST size and should generally be larger than upload_max_filesize

upload_max_filesize is the maximum size of a file that can be uploaded

In addition to these 3 directives there is a 4th directive that must be considered. The directive is memory_limit. The memory_limit directive must be set to a value larger than your post_max_size. In PHP 4 you cannot set this directive via php.ini or .htaccess. It must be set during the installation and initial configuration of PHP.

memory_limit in PHP versions prior to 5.2.0 defaults to 8MB which means even if your post_max_size and upload_max_filesize are set to 25M and 20M respectively per my example you will only be able to upload and attach files that are 8MB or less.

So in order to work with file attachments larger than 8MB you really need to be running PHP5. I believe most servers now include BOTH PHP4 and PHP5 which can be toggled by directory through the use of the following command added to the .htaccess file:

AddHandler application/x-httpd-php5 .php

The AddHandler above basically says to use PHP5 for all requests to file of type .php. PHP 5.2.0 and above now includes a default of 128MB for the memory_limit directive. So once you are running PHP5 (which must be a version greater than 5.2.0) you will be able to upload files up to 128MB (or larger if you change this directive via php.ini which you can do in PHP versions 5.2.0 and above).

I think that pretty much covers it, at least at a hi-level. If you have any questions about these specific directives please Google them before contacting support or posting a question to this thread.

I hope this helps someone else. I wasn't able to find the answer in the forums and wanted to post what I found out through research and working with support.

Cheers,
sandersans
__________________
funny, witty, thought provoking signature
sandersans is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old February 12th, 2008, 6:36 PM   #2 (permalink)
Surpass Developer
On a golden path...
 
Mark's Avatar
 
Joined in Jan 2004
Lives in Florida
Hosted on decc.surpasshosting.com
396 posts
Gave thanks: 10
Thanked 68 times
stickied for your pleasure
__________________
Mark
Surpass Hosting Developer
sɹnoʎ uɐɥʇ ɹǝʇʇǝq sı bıs ʎɯ
Mark is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On