Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support PECL uploadprogress #3934

Closed
rcubetrac opened this issue Sep 17, 2012 · 6 comments
Closed

Support PECL uploadprogress #3934

rcubetrac opened this issue Sep 17, 2012 · 6 comments

Comments

@rcubetrac
Copy link

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:

  • drop-in replacement for APC handling
  • PECL uploadprogress is prefered
  • no new config parameters: if Uploadprogress is present, use it instead of APC

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

@rcubetrac
Copy link
Author

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

There's already a pull request for upload progress handling with lighttpd mod_uploadprogress (#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
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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

Done in 93e12fa.

@rcubetrac
Copy link
Author

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

new => closed

@rcubetrac
Copy link
Author

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

later => 1.1-beta

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant