How to upload big files
In TYPO3 it is - by default - impossible to upload files bigger than 10 MB. Here's a short list of actions in order to bypass this limit installation:
Modification of the Apache PHP module configuration
First, there is a limit on the Apache PHP module configuration (not to confuse with the php.ini PHP configuration) which can be in /etc/httpd/conf.d/php.conf or other place depending of your Apache installation (like /etc/apache2/mods-enabled/php5.conf on Ubuntu). There you've to change the "LimitRequestBody" the desired size (like "100MB"). If you don't change this you'll probably get a "connection reset" error message.
Mofification of the Apache SSL configuration
If your backend module is secured via SSL (always a good idea), then you might have to adapt what is called the "maximum size for SSL buffer": add the entry "SSLRenegBufferSize 10486000" somewhere appropriate---for example into the "<Directory>" section governing access to your typo3 installation in one of your apache config files.
Modification of the PHP configuration
The filesize is globally restricted by PHP thus you have to change the PHP settings to appropriate values to accept bigger files before changing TYPO3 settings. You can change these values directly via php.ini or via a .htaccess-file:
Entries for php.ini:
;;;;;;;;;;;;;;;;;;; ; Resource Limits ; ;;;;;;;;;;;;;;;;;;; max_execution_time = 1000 ; Maximum execution time of each script, in seconds max_input_time = 1000 ; Maximum amount of time each script may spend parsing request data
; Maximum size of POST data that PHP will accept. post_max_size = 100M
; Maximum allowed size for uploaded files. upload_max_filesize = 100M
Entries for .htaccess-file
php_value max_execution_time 1000 php_value max_input_time 1000 php_value post_max_size 100M php_value upload_max_filesize 100M
Keep in mind that it the server admin could have disallowed to change these values via .htaccess.
Edit TYPO3 Configuration
Via Install Tool
Go to All Configuration and search for [maxFileSize]. Insert the new string into the input field and hit the button Write to localconf.php afterwards.
Directly via localconf.php
Paste this line into a new line in localconf.php:
$TYPO3_CONF_VARS['BE']['maxFileSize'] = '100000';
Hack of t3lib/class.t3lib_extfilefunc.php (NOT RECOMMENDED)
var $maxCopyFileSize = 100000; // max copy size (kb) for files var $maxMoveFileSize = 100000; // max move size (kb) for files var $maxUploadFileSize = 100000; // max upload size (kb) for files. Remember that PHP has an inner limit often set to 2 MB
This hack is not needed if you set $GLOBALS['TYPO3_CONF_VARS']['BE']['maxFileSize']. TYPO3 takes the value of this setting for all three properties (see line 163 ff in t3lib/class.t3lib_extfilefunc.php).
Modify $TCA-parameters
Several content elements have own restrictions for the maximum upload size. You can change these values easily by modifying the TCA of these elements. You can do this in several ways:
- Open the file ext_tables.php of an already installed extension in typo3conf/ext/.
- OR create a new extension and add the code to the file ext_tables.php.
- OR open the file extTables.php in folder typo3conf/.
Make sure that this file gets included by the following line in typo3conf/localconf.php:
$typo_db_extTableDef_script = 'extTables.php';
In any case, add the following lines to the file:
t3lib_div::loadTCA('tt_content');
// This changes the upload limit for image elements
$TCA['tt_content']['columns']['image']['config']['max_size'] = 100000;
// This changes the upload limit for media elements
$TCA['tt_content']['columns']['media']['config']['max_size'] = 100000;
// This changes the upload limit for multimedia elements
$TCA['tt_content']['columns']['multimedia']['config']['max_size'] = 100000;
Clear extension cache via Clear cache in typo3conf/
All right, now you can upload big files!
(originally written by Mutato of typo3.fr)