Loading...
 
Skip to main content

Architecture / Installation


Large(ish) uploads to FG appear to work but are corrupt

Hello everyone!

We are in the beginning phases of setting up Tiki for use as our company Intranet and I've been giving the duties of Tiki Admin.

So far everything has gone smoothly, and I have to say I'm very impressed!

Anyway... I'm having trouble with large file uploads. So far I have configured the following:

Changed the required settings in the php config
Added the max_allowed_packet to mysql config

So now I can upload most file just fine, but when I go to download or view them, they seem corrupt. The file at issue was a 1.6mb PDF, and when I split it worked just fine.

We are running it on a CentOS install btw.

Any help would be greatly appreciated!

Rick Sapir / Tiki for Smarties wrote:

Are you storing files in the database or directory?

Also, what Tiki version are you using?

HTH,


We are running 6.3 and files are stored in the database.

Nathan Muleski wrote:
We are running 6.3 and files are stored in the database.


Corrupt files, when stored in the DB, often symptomatic of encoding issues with your database. Is this a new 6.3 installation, or did you upgrade from an earlier version. See http://doc.tiki.org/Upgrade#Fix_the_encoding_issueQuestion for details.

Since you're storing files in the database, you may also need to increase the max_execution_time and max_input_time.

Other things to check:

  • Are you using wiki attachments? If so, are you storing them in the database, too? And if so, do you also encounter issues with attachments?
  • If you temporarily change to store files in the file directory, are you able to upload/download large files? If so, then the problem is most likely that MySQL is closing the database connection before Tiki completes the file upload.



HTH,

- RickQuestion | My Tiki Blog | My Tiki UserPage

Tiki for Dummies SmartiesQuestion, the best (and only) Tiki beginner's guide! Learn more...Question

Tiki EssentialsQuestion, the best-selling book for Tiki! Learn more...Question

Need more help? Try Tiki for Dummies SmartiesQuestion: A beginner's guide and Tiki EssentialsQuestion: What all Smarties need to know about Tiki Wiki CMS Groupware.

Rick Sapir / Tiki for Smarties wrote:

Corrupt files, when stored in the DB, often symptomatic of encoding issues with your database. Is this a new 6.3 installation, or did you upgrade from an earlier version. See http://doc.tiki.org/Upgrade#Fix_the_encoding_issueQuestion for details.

Since you're storing files in the database, you may also need to increase the max_execution_time and max_input_time.

Other things to check:

  • Are you using wiki attachments? If so, are you storing them in the database, too? And if so, do you also encounter issues with attachments?
  • If you temporarily change to store files in the file directory, are you able to upload/download large files? If so, then the problem is most likely that MySQL is closing the database connection before Tiki completes the file upload.



HTH,


Hey, thanks for the reply.

-- This is a fresh install.

-- Even though the files seemed to be uploading in less then the max_execution_time I up'ed both of those... no change

-- We are not using wiki attachments.

-- I tried to change it to store in directory but I can't get it to write to any directories... I tried a directory in /var/www/html/tiki and I also tried one in /home/administrator . I gave read/write permissions to everyone on both directories but I still get the "Cannot write to this file:" error. Any idea's how get directory uploads working? I think I'd rather store files in the directory anyway.

Nathan Muleski wrote:
-- I tried to change it to store in directory but I can't get it to write to any directories... I tried a directory in /var/www/html/tiki and I also tried one in /home/administrator . I gave read/write permissions to everyone on both directories but I still get the "Cannot write to this file:" error. Any idea's how get directory uploads working? I think I'd rather store files in the directory anyway.



The directory location should be relative to your Tiki install. So you most likely don't need home or var etc.

Try this:

  1. Assuming that you've installed Tiki in a directory named tiki, create a new directory (inside tiki) named myfiles.
  2. Change the permissions for the myfiles directory to 7-7-5.
  3. In Tiki, on the Admin: File Galleries page, configure the directory path to: myfiles/
    Note the trailing slash.


I can definitely say that uploading large files works in Tiki 6.3 — I just updated a 12MB file to one of my sites.

My troubleshooting guideQuestion may also be helpful.


HTH,

- RickQuestion | My Tiki Blog | My Tiki UserPage

Tiki for Dummies SmartiesQuestion, the best (and only) Tiki beginner's guide! Learn more...Question

Tiki EssentialsQuestion, the best-selling book for Tiki! Learn more...Question

Need more help? Try Tiki for Dummies SmartiesQuestion: A beginner's guide and Tiki EssentialsQuestion: What all Smarties need to know about Tiki Wiki CMS Groupware.

Rick Sapir / Tiki for Smarties wrote:

The directory location should be relative to your Tiki install. So you most likely don't need home or var etc.

Try this:

  1. Assuming that you've installed Tiki in a directory named tiki, create a new directory (inside tiki) named myfiles.
  2. Change the permissions for the myfiles directory to 7-7-5.
  3. In Tiki, on the Admin: File Galleries page, configure the directory path to: myfiles/
    Note the trailing slash.


I can definitely say that uploading large files works in Tiki 6.3 — I just updated a 12MB file to one of my sites.

My troubleshooting guideQuestion may also be helpful.


HTH,


Making the directory local to the Tiki install worked. I can upload large files (I did up to 10mb successfully) and they aren't corrupt. Awesome!

I'd still like to know why it wouldn't work when storing them in the database though. I can't find a reason why it shouldn't.