Architecture / Installation

Architecture / Installation

Uploading to file gallery corrupts files

posts: 4

I'm a very new Tiki user, I just set one up for my company a few weeks ago and decided to upgrade to v5 yesterday.

I though everything had went well and I was playing about with new features but now I've discovered that I can't upload images or seemingly any other type of file to the file gallery without that file being corrupt when you try to download it again. I've tried jpg, png and doc

This was definitely working before I upgraded.

I've uploaded a small 18379 byte jpg and then when I download it again it's only 18025 bytes

Can anyone help?


posts: 4

I've now restored my tiki4 backup directory and uploading works fine in version 4

So is this a bug in Tiki5?


posts: 4

I'm storing the files in the database

I tried to use directories but I couldn't get them to work. When I enabled directories and told it not to use the database the insert image button disappeared from the edit wiki page


posts: 3660 United States

Switching the storage location from DB to Directory shouldn't change anything in the Edit interface... I don't see how that can happen?

Just to confirm.... You're using the File Gallery to store wiki images, right? And you get a different Edit page interface, depending if you store the File Gallery items in the database or directory?


- Rick | My Tiki Blog | My Tiki UserPage
Need more help? Try TikiWiki for Dummies Smarties.
Now in Beta:: Tiki Essentials: What all Smarties need to know about Tiki Wiki CMS Groupware

posts: 4644 Japan

Try commenting out (start the line with two forward slashes) or deleting the last line of db/local.php (regarding utf-8).

-- Gary

posts: 4

commenting our the utf-8 line worked a treat, thanks

with regards the insert image icon disappearing, I was assuming it disappeared because the plugin was detecting that it had nowhere to save the images to because I hadn't the directories setup right or something. The wee icon definitely vanishes when I turn off the save to file gallery option. I use the WYSIWYG editor interface

posts: 12

Hi gents!
Sorry for my Englih...

I have the same problem with corrupted uploads, but I'm not able to edit the local.php file. I cannot change permissions, and don't know why. I have renamed .htacces to _htacces, and a file named "lock", but I still can't change perms of local.php.
Can anyone help me??

regards from spain


posts: 15

Modifying the local.php file worked to fix the problem of my image files being corrupted on upload also. The files are now showing up properly-- except the site logo in the header.

I have tried pointing it at gif, png and jpg files both in the DB and external to the site. It was working intermittently at first, but now mostly I just see the alt text.

Any ideas how to fix this?

posts: 9 Nigeria

I am so glad that you posted this solution! After a couple of hours on the problem, I wondered if it had to do with the database coding, but that is a rather opaque area to me.

Can you tell us a bit more? Is there any side effect of commenting out the UTF-8 line? Any other issues with compatibility?

Perhaps a warning could be put onto the File Gallery documentation pages until the problem is fixed, to save others the frustration?


posts: 4644 Japan

I wondered about the side-effects of commenting out that line, too, since my sites seemed to function fine without it. At the time, I didn't see a reply to the question; maybe by now it's been worked out, but there was a larger issue to fix involving character encoding, so probably things will be straightened out in the Tiki 5.1 release (no date set for that yet, as far as I know).

I added a note about this on the doc.tikiwiki.org File Gallery User page, as per your suggestion (though the docs site is a wiki, and any one can edit the pages, I believe wink).

-- Gary

posts: 9 Nigeria
Thanks, Gary. I noticed that warning when I checked the docs again. I didn't realize it was a wiki (duh) but in any case I don't feel I know enough about the innards of tikiwiki to be contributing to the docs yet.
posts: 8
ahh, thank you very much - I was at my wits end why "own images" (in articles) kept 'disappearing'

posts: 1817 Catalan Countries

Enric, can't you edit the local.php through ftp?
(download, edit, upload again?)

and/or change permissions through the ftp program?

posts: 12

Hi Xavi.

I cannot change permissions of the file at any way. I have tried it via FTP, and via the File Manager of the Hosting Control Panel.
I can download local.php and edit the file in my local folder, but I can't upload the file, because the remote file doesn't permit overwritting.

posts: 8

Check if your database really is utf-8. Mine was latin1 (default, simply forgot to specify) and gave me lots of trouble. It should be explicity mentioned in the install-instructions.

CREATE DATABASE db_name CHARACTER SET utf8 COLLATE utf8_general_ci;

Commenting out the last line in db/local.php is likely to cause an encoding mess.

posts: 26 United Kingdom
I am having similar problems. Conflicting advice in this thread, means I will wait for a fix.

posts: 1817 Catalan Countries

Hi all:

We've been working on this issue during the recently finished TikiFestBarcelona2. And it seems to be fixed in Tiki5.1, as fas as we tested in few servers and sites.

5.1 is to be released soon (later this week or weekend, probably).

posts: 26 United Kingdom
Many thanks for letting us know. Do you know if this is the same issue/problem with article topic images not displaying?