Fullscreen
Loading...
 
Skip to main content

Cannot upload a file greater than 1 MB to file gallery

Status
Pending
Subject
Cannot upload a file greater than 1 MB to file gallery
Version
2.x
Category
  • Error
Feature
File Gallery (elFinder or standard UI)
Resolution status
Please retest
Submitted by
hamdev
Lastmod by
Beestje
Rating
(0)
Description

In tikiwiki 2.2, I created a file gallery and then attempted to upload a file. Set to save in database.

With memory_limit in php.ini set to 32M, the upload page says max file size is limited to 4MB. I can upload files that are smaller than 1 MB, but files larger than 1MB produce the PHP error message:

Image
Copy to clipboard
Fatal error:Allowed memory size of 33554432 bytes exhausted (tried to allocate ... bytes) in ...\lib\tikidblib.php on line 208


If I set the memory_limit to 64 MB, the upload page says max file size is limited to 15MB. If I try to upload a file larger than 1 MB, PHP generates the error:

Image
Copy to clipboard
Fatal error:Call to member function fetchRow() on a non-object in ...]lib\tikiklib.php on line 920


If I set to save to a folder instead, upload works.

Solution

In /etc/my.cnf, change the following line to the desired max upload size.

Copy to clipboard
max_allowed_packet = 1M
Priority
25
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
2267
Created
Monday 19 January, 2009 18:18:36 UTC
by Unknown
LastModif
Monday 20 April, 2009 15:10:20 UTC


Show PHP error messages