Loading...
 
Skip to main content

Architecture / Installation


Downloads from File Gallery Broken Again

posts: 31 United States

In item http://tikiwiki.org/tiki-view_forum_thread.php?comments_parentId=2685&topics_threshold=0&topics_offset=92&topics_sort_mode=lastPost_desc&topics_find=&forumId=6, I reported a problem with the downloading of files when stored in a directory.

Mose quickly came up with the following fix:

''Edit lib/tikilib.php and replace line 1459 as follows:

$query = "select path,galleryId,filename,filetype,data from tiki_files where fileId='$id'";

with

$query = "select path,galleryId,filename,filetype,data,filesize from tiki_files where fileId='$id'";''

Once I removed my files and reuploaded them, the problem disappeared.

HOWEVER...

Recently, I relocated my Tikiwiki site to a new server by a) copying the entire directory tree, b) CHMODing the appropriate directories and c) importing my db dump into a new MySQL database.

The site loads beautiful, except... the download bug has returned!Essentially, you can Save as... a file in the File Gallery, but you cannot Open the file straight off the server. Instead, the file fails to load into its application. This is the case regardless of browser or application type.

Check out the file libraries on Tikiwiki.org and you will see the same behavior.

I can't image why this problem has returned, given it is the exact same set of files as my old site, including the updated tikilib.php gfile.

Any suggestions as to a fix or workaround would be appreciated.

/melissa

posts: 31 United States

I think I found a workaround! I went into the Admin settings for File Galleries and set it back to use the db instead of a directory. Then I saved it.

Then I went back again and returned the File Gallery setting to use the directory I was using before.

Viola! Now it works again!