roundcube / roundcubemail

The Roundcube Webmail suite
https://roundcube.net
GNU General Public License v3.0
5.85k stars 1.63k forks source link

Support PECL uploadprogress #3934

Closed rcubetrac closed 10 years ago

rcubetrac commented 12 years ago

Reported by antondollmaier on 17 Sep 2012 11:18 UTC as Trac ticket #1488702

Hi,

instead of relying solely on APC for handling the upload progress bar, RoundCube should also support the PECL extension dedicated to this purpose: Uploadprogress.

http://pecl.php.net/package/uploadprogress

Additional information by one of the authors, including a demo:

https://blog.liip.ch/archive/2009/03/31/upload-progress-meter-common-issues-and-some-answers.html

Also Drupal supports this extension per default.

The changes are only needed in program/include/main.inc, no other files are touched.

Please see attached patch.

Additional information:

Keywords: uploadprogress Migrated-From: http://trac.roundcube.net/ticket/1488702

rcubetrac commented 12 years ago

Comment by @alecpl on 17 Sep 2012 11:34 UTC

There's already a pull request for upload progress handling with lighttpd mod_uploadprogress (https://github.com/roundcube/roundcubemail/pull/22). Upload progress can be also handled with session since PHP 5.4. Keep this in mind and write a solution which provides all methods with a clean code.

rcubetrac commented 12 years ago

Comment by antondollmaier on 17 Sep 2012 11:39 UTC

I'm confused :)

My patch does the same thing as the code for mod_uploadprogress - even changing less code.

If another config option is wanted, I'll extend the patch.

rcubetrac commented 12 years ago

Comment by dfwarden on 17 Sep 2012 14:39 UTC

As someone who uses xcache and not APC I'm happy to see the PHP 5.4 session-based upload progress and this PECL module for upload progress.

Lighttpd's mod_uploadprogress is a very different beast than PECL uploadprogress, or really any of the PHP upload progress systems. The existing systems all rely on some sort of runtime memory query, be it in the APC module, in the PECL uploadprogress module, or in the PHP 5.4 session variable. Unfortunately those won't work with fastcgi. Per the blog post you linked, if you follow the link to the PHP bug for the fastcgi issue, the important part is the comment (when running PHP in fastcgi) "PHP doesn't actually see the upload until the entire file is already uploaded." Lighttpd's module is something that tracks POSTs before they are seen by PHP and is queried via HTTP requests.

I closed my pull request because it is inefficient (extra HTTP request) and I think I now understand how to do it cleaner as a plugin, so I would ask that supporting lighttpd mod_upload not be a requirement for your patch. I do think the PHP 5.4 method should be supported by your patch (since it is so similar to APC and PECL uploadprogress) but I'm not an RC maintainer...

rcubetrac commented 10 years ago

Comment by @alecpl on 4 May 2014 07:40 UTC

Done in 93e12fa4147191ec40ef5de03b4c7c211012eb4c.

rcubetrac commented 10 years ago

Status changed by @alecpl on 4 May 2014 07:40 UTC

new => closed

rcubetrac commented 10 years ago

Milestone changed by @alecpl on 4 May 2014 07:40 UTC

later => 1.1-beta