Fullscreen
[Show/Hide Right Column]

Upload file size

If your Tiki is hosted by an ISP, you'll need to find out how set the maximum upload size. If you have command line access, you'll need to adjust some parameters setting in your server's php.ini file. The example below shows an maximum upload size of 10 megabytes.
upload_max_filesize = 10M
file_uploads = On
post_max_size = 11M
memory_limit, max_input_time, max_execution_time   must be appropriate

  • file_uploads: Must be On
  • upload_max_filesize: is the maximum of the sum of the sizes of all the files that you are uploading.
  • post_max_size: ideally this value should be larger than the value that you set for upload_max_filesize. post_max_size is the upload_max_filesize plus the sum of the lengths of all the other fields in the form plus any mime headers that the encoder might include
  • memory_limit: Only to be properly assign if --enable-memory-limit is on
  • max_input_time:
  • max_execution_time
If you can not change your php.ini, you can modify your .htaccess by adding these lines
php_value upload_max_filesize	"10M"
php_value post_max_size         "11M"
php_value max_execution_time	300
php_value max_input_time        300
#if the files are stored in the database, you can add the following line
php_value memory_limit		"64M"


If you change your php.ini, You will need to re-start your apache or other webserver for the change to take effect.
More info


If you are storing your files in the database, you need to check this MySQL variable:


max_allowed_packet


This variable can be located in the "my.ini" file as shown in the figure below.
The "my.ini" file is located in the same directory as your MySQL server install.
For example, on a development box, you may have installed it at:

"C:/Program Files/MySQL/MySQL Server 5.1/my.ini"

If you can't find a my.ini file, look for "/etc/my.cnf" instead.

Click to enlarge
Click to enlarge


Open the "my.ini" file and find the [[mysqld]] section.

If there is not already an entry for your "max_allowed_packet" variable, then add one as shown
in the figure above (e.g. max_allowed_packet=64M).

Make sure that you have enough storage allocated to your database to handle the size of your files!

Once you have added an entry to set this variable as in the figure above, save
the modified "my.ini" file and restart your MySQL server.

Again, on a typical Windows development box, you can locate your "mysql" service
(if you have it running as a service under Windows: Start->Run->"services.msc")
and simply right-click and choose "restart".

Click to enlarge
Click to enlarge


You can use the phpMyAdmin console to check the value of your "max_allowed_packet" variable.

Select the "Variables" tab on the main phpMyAdmin screen. Scroll down until you find the
correct variable, and then check that the value matches that which was set in the "my.ini" file.
See the figures below...

Click to enlarge
Click to enlarge


Click to enlarge
Click to enlarge



Contributors to this page: Marc Laporte9146 points  .
Page last modified on Tuesday 28 June, 2011 20:33:36 UTC by Marc Laporte9146 points .
The content on this page is licensed under the terms of the Creative Commons Attribution-ShareAlike License.

Site Language

Reference Guide

Keywords

These keywords serve as "hubs" for navigation within the Tiki documentation. They correspond to development keywords (bug reports and feature requests):



Tiki Newsletter

Delivered fresh to your email inbox!
Newsletter subscribe icon
Don't miss major announcements and other news!
Contribute to Tiki

Show php error messages
 
PHP (5.3.5-1ubuntu7.8) ERROR (E_WARNING):
File: lib/images/abstract.php
Line: 231
Type: getimagesize(dl95) [function.getimagesize]: failed to open stream: No such file or directory
PHP (5.3.5-1ubuntu7.8) ERROR (E_WARNING):
File: lib/images/abstract.php
Line: 231
Type: getimagesize(dl98) [function.getimagesize]: failed to open stream: No such file or directory
PHP (5.3.5-1ubuntu7.8) ERROR (E_WARNING):
File: lib/images/abstract.php
Line: 231
Type: getimagesize(dl96) [function.getimagesize]: failed to open stream: No such file or directory
PHP (5.3.5-1ubuntu7.8) ERROR (E_WARNING):
File: lib/images/abstract.php
Line: 231
Type: getimagesize(dl97) [function.getimagesize]: failed to open stream: No such file or directory