File uploads may fail from time to time, especially when uploading large files (>20MB). The following is a list of common settings and configurations that can be the cause:
Tiki loads the uploaded file into memory to do search indexing, typing, and sizing of the tiles. The memory_limit setting in PHP can be increased to prevent these steps from crashing your PHP process. You can see your current memory_limit with the tiki-phpinfo.php file (see PHPInfo). Try raising this setting to 512MB.
TIki should tell you directly if you are trying to upload a file that exceeds the PHP configuration, but in case it does not, check the upload_max_filesize setting (PHPInfo). Increase this settings as is appropriate for your limits.
If your file size exceeds the post_max_size variable, then PHP will strip all the POST data. Make sure that this setting is greater than upload_max_filesize.
Tiki can store its uploaded files in the database in a LONGBLOB field. Storing large amounts of data in a database row can be tricky and require some fine tuning of your database parameters. You may want to switch to local disk storage as a first option.
- Go to Settings -> Control Panel -> File Galleries
- Change Storage to "Store in Directory"
- Set the "Path to store files in the file gallery" field
- Click "Apply"
You can also try to fix the problem with the database storage. If you are using database storage for large files and you are using MySQL's INNODB engine, you could be getting an error like "Row size too large". If so, try the following:
1. Add the following to the my.cnf file under mysqld section.
innodb_file_per_table innodb_file_format = Barracuda
2. ALTER the table to use ROW_FORMAT=COMPRESSED.
ALTER TABLE nombre_tabla ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
Note: It is not recommended to store more files more than 100MB in a database