Loading...
 
Skip to main content

Files uploaded get corrupted in some installs storing files in database

Status
Closed
Subject
Files uploaded get corrupted in some installs storing files in database
Version
18.x
18.x Regression
Category
  • Error
  • Regression
  • Community projects
  • Dogfood on a *.tiki.org site
Feature
File Gallery (elFinder or standard UI)
Resolution status
Works For Me
Submitted by
Xavier de Pedro
Volunteered to solve
rjsmelo
Lastmod by
Xavier de Pedro
Rating
(1)
Description

Uploading png files to file galleries get them corrupted somehow. See screenshots (I'll upload them here in short). And a pdf file I uploaded to the file gallery, after I downloaded it again from tiki, I couldn't see its contents properly (see the other screenshot; some font seems to be missing). If I open the source pdf file (not passing through tiki file gallery but directly the one I had in my computer from elsewhere), I can see the contents of that pdf as expected
Image
Image
Image
Image

Fairly standard setup on Ubuntu 16.04 (see Ubuntu Install ), with mysql 5.7.x, and php 7.0.x (originally, but same issue with php 5.6, 7.0.x, 7.1.x, 7.2.x). Using gd (imagemagick installed also after I hit the bug the first time, just in case it automagically helped, but it didn't - I didn't remove gd, btw)

I've tested also using tiki15svn, and I couldn't use it due to some weird error I had never seen before of zend session validator class not finding Id.php in place. (!). Therefore, I couldn't test tiki15svn in the same server.

I tested using tiki17svn, and file uploads worked as expected (nice!).
I tested using tiki18svn, or tiki trunk, and I got the issue I reported.


-

Gosh, similar issue might be happening on dev.t.o (at least for me; is it only me???): try to see the png files that I produced as screenshots, e.g.:
https://dev.tiki.org/tiki-list_file_gallery.php?galleryId=1&fileId=1194&view=page


-

Update: avoided the issue by means of changing the storage of files in file galleries from db to file system.

Therefore, the issue might be specific to Tiki18+ and Mysql5.7 maybe? (in another production server of mine, the setup is fairly similar in Ubuntu 16.04, but with MariaDb instead of MySQL 5.7, and I didn't see the issue of images getting corrupted).
As a consequence, I removed the tag "Release blocker", since I'm not sure how many production server are out there with MySql 5.7 and storing files in database. Feel free anyone to re-tag to release blocker if this is too critical for someone else.


I removed "19.x" categorization because branch 19 doesn't exist yet. The category "regression from version 18 to 19" is accurate here and already assigned.

Solution
As far as I know, this was fixed long ago (at least the bug report I did). Closing ticket.
Importance
10 high
Easy to solve?
5
Priority
50
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
6660
Created
Thursday 10 May, 2018 12:13:43 UTC
by Xavier de Pedro
LastModif
Sunday 23 September, 2018 20:58:18 UTC


Show PHP error messages