|
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
|