Loading...
 
Skip to main content

Features / Usability


How do you set max file size for uploads?

I'm trying to upload a PDF version of a manual which runs to 3+ Mb. I keep getting a "File too big" error. I tried switching from Upload to database to Upload to directory but that didn't help. Same message. Smaller files upload OK, so it doesn't seem to be the upload process itself that's the problem. I've also consulted our DBA and he doesn't think it's a problem with a file size limit on the server itself. So I'm guessing there must be a way on one of the Admin pages to reset max file size for uploads but I can't find it. (Can't find in doc either.)Thanx,

--John 😕

Answered my own question, or rather Damian already provided the answer. Apparently, there's no way to directly increase the max upload file size in php.ini, so Damian posted a script workaround. See:

http://tikiwiki.org/tiki-index.php?page=FileGalleryImportFileScriptQuestion

This script will do your heavy uploading. Thanx, Damian!

--John 😀

(Minor) corrigendum to instructions:

With the script in your tiki folder, point your browser to:

tiki/tiki-import_file.php?galleryId=[]&fname=[]


Try editing the TPL template file. Look for the line:

Image
Copy to clipboard
<input type="hidden" name="MAX_FILE_SIZE" value="10000000" />


Try increasing the MAX_FILE_SIZE value.

HTH,

-RickQuestion


> I'm trying to upload a PDF version of a manual which runs to 3+ Mb. I keep getting a "File too big" error. I tried switching from Upload to database to Upload to directory but that didn't help. Same message. Smaller files upload OK, so it doesn't seem to be the upload process itself that's the problem. I've also consulted our DBA and he doesn't think it's a problem with a file size limit on the server itself. So I'm guessing there must be a way on one of the Admin pages to reset max file size for uploads but I can't find it. (Can't find in doc either.)Thanx,
>
> --John 😕



In your php.ini there is a line that looks like.

upload_max_filesize = 2M

Just change that to whatever size you want.


Configuring php.ini, using a script in the background, all doesn't look good to me!

BTW: the developers of TikiWiki might take a look at phpMyAdmin. This tool works for huge database up-/downloads without all those "config" options and modifications.

At my provider e.g. I was not able to change the php.ini file due to a bug in PHP which fails together with Linux user file quota. Therefore I'm also stuck with this limit in TikiWiki, however uploading database backups (several 10th of MBs) works without problems.

So, to me it seems as this could also be solved by the developers and removing a number one (FAQ already) request for "file upload limits".

Best regards,

Bernhard

If you know how they did, I am interested
Read on DOcumentation.html from phpmyAdmin instal

1.16 I cannot upload big dump files (memory, http or timeout problems).

The first things to check (or ask your host provider to check) are the values of upload_max_filesize, memory_limit and post_max_size in the php.ini configuration file. All of these three settings limit the maximum size of data that can be submitted and handled by PHP. One user also said that post_max_size and memory_limit need to be larger than upload_max_filesize.

There exist several workarounds if your upload is too big or your hosting provider is unwilling to change the settings:
- Look at the $cfg'UploadDir' feature. This allows one to upload a file to the server via scp, ftp, or your favorite file transfer method. PhpMyAdmin is then able to import the files from the temporary directory. More information is available in the Configuration section of this document.
- Using a utility (such as BigDump) to split the files before uploading. We cannot support this or any third party applications, but are aware of users having success with it.
- If you have shell (command line) access, use MySQL to import the files directly. You can do this by issuing the "source" command from within MySQL: source filename.sql.

It doesn't seem to be a solution but a workaround.