Login or Register

RSS IconRecent posts in this topic

avatar Pro
ebatte on Sep 23. 2006. 1:24 am
Nope, that's not it. I just tried the download from home with max_memory set to unlimited and I only got 5.2MB downloaded (of 8.71MB)
avatar Pro
ebatte on Sep 25. 2006. 4:44 pm
I noticed this in my server error log:

PHP Fatal error: Maximum execution time of 120 seconds exceeded in W:\\www\\activeCollab\\environment\\functions\\files.php on line 332, referer: http://collab.mgarchitects.com/activeCollab/index.php?c=document&a=index&active_project=27


Could it be related?
avatar Pro
ebatte on Oct 3. 2006. 7:31 pm
Ilija, I'm not sure what's going on but my clients are getting corrupted zip files when they download from activecollab. Any ideas what could cause this?
avatar Pro
ebatte on Oct 3. 2006. 9:49 pm
I tried it myself locally...I typically use firefox and I have not had a problem. I just tried it with Internet Explorer 7 and the zip was corrupted.

Ideas?
avatar Staff
Ilija Studen on Oct 3. 2006. 10:37 pm
I have no ideas. That problems seams local (I can't remember if anybody else reported it). Server configuration?

Did anyone else had this type of problem?

A friend of mine told me that he had some issues with Firefox and that he found following solution: don't send file size as header. You should try this:

1. Open environment/functions/files.php
2. Find download_contents function
3. Remove this like: header("Content-Length: " . (string) $size);
activeCollab Team Member
avatar Pro
ebatte on Oct 4. 2006. 2:49 pm
Sorry, but you'll have to be a little more explicit for me.

Do I delete (or comment) the entire section between:

/**
* Use content (from file, from database, other source...) and pass it to the browser as a file
*
* @param string $content
* @param string $type MIME type
* @param string $name File name
* @param integer $size File size
* @param boolean $force_download Send Content-Disposition: attachment to force save dialog
* @return boolean
*/
function download_contents($content, $type, $name, $size, $force_download = false) {
if(connection_status() != 0) return false; // check connection

if($force_download) {
header("Cache-Control: public");
} else {
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
} // if
header("Expires: " . gmdate("D, d M Y H:i:s", mktime(date("H") + 2, date("i"), date("s"), date("m"), date("d"), date("Y"))) . " GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Content-Type: $type");
header("Content-Length: " . (string) $size);

// Prepare disposition
$disposition = $force_download ? 'attachment' : 'inline';
header("Content-Disposition: $disposition; filename=\"" . $name) . "\"";
header("Content-Transfer-Encoding: binary");
print $content;

return((connection_status() == 0) && !connection_aborted());
} // download_contents

/**




And replace it with the text in your message above?

thanks,
Eric
avatar Staff
Ilija Studen on Oct 4. 2006. 4:08 pm
Just remove (or comment) this line:

header("Content-Length: " . (string) $size);
activeCollab Team Member
avatar Pro
ebatte on Oct 4. 2006. 4:23 pm
Nope. That had no effect.

I'm stumped. No one else is having these problems?

Apparently the corruption is limited to zip files only. Other file types download OK.
avatar Staff
Ilija Studen on Oct 4. 2006. 5:44 pm
Does your server sends gziped or ziped data to the browser?

For those who don't know, that is one of the best way to save bandwidth. Text based formats (text files, HTML, CSS, JavaScript etc) are pretty easy to compress with high compression ratio. Server zips the files and sends them zipped to the browser. Browser just unpacks them when all data is received. Few processor cycles on server and few on client result in great bandwidth savings.
activeCollab Team Member
avatar Pro
ebatte on Oct 4. 2006. 5:55 pm
I checked and the gzip parameters appeared to be enabled.
Topic is locked. If you have something important to say about issues discussed on this page please write at hi@a51dev.com.

RSS IconRecent posts in this topic