By default, PHP configurations (and in some situations MySQL too) keep you from performing uploads of large files. Usually large means over 1 MB. This can be changed, and the way to do it isn't ))TikiWiki-specific((.
This explains how to configure PHP, assuming you know where your PHP configuration file is. If you don't, run
Copy to clipboard
locate php.ini php.conf
For MySQL (if you want to store your files in the database instead of the filesystem) you need to change my.cnf's setting max_allowed_packet to something high enough.
Interesting information
readfile broken in some php release
Old version of this page
[+]
Essentially, to enable large uploads (>5M) you need to change two things. I have Gentoo Linux running so I will
detail how to do it with Gentoo, but the config files should exist (albeit in different places on different systems)
1.Change the LimitRequestBody in php.conf (not php.ini)
php.conf is the config file to mod_php. On my Gentoo installation,
this resides in /etc/apache2/conf/modules.d/70_mod_php.conf
If you are having trouble finding this file use:
grep -r LimitRequestBody /etc/*
Change the line:
to:
LimitRequestBody 524288000
or whatever limit you want.
2.Change upload_max_filesize in php.ini
Find your php.ini. Mine was in /etc/php4/php.ini.
Make sure file uploads are enabled and ensure that you change.
Change:
; Whether to allow HTTP file uploads.
file_uploads = Off
; Maximum allowed size for uploaded files.
upload_max_filesize = 2M
to:
; Whether to allow HTTP file uploads.
file_uploads = On
; Maximum allowed size for uploaded files.
; Use my limit or make up your own
upload_max_filesize = 500M
3. Ensure files are uploaded to a DIRECTORY rather than the Database
In Admin->File Gallery ensure that you upload files to a directory. Big Files in the DB is not a good idea
in my opinion unless you want to mysqldump's frequently of the content. Let us know how it goes ❓.
4. Restart Apache and hope it all works
Knowledgebase / tutorial / FAQ / How-to
For more information