Installing the PECL 'uploadprogress' Library

When you load your Drupal 7 site's 'Status report' page, you may see that 'Upload progress' is 'Not enabled':

Your server is capable of displaying file upload progress, but does not have the required libraries. It is recommended to install the PECL uploadprogress library (preferred) or to install APC.

Why install the PECL uploadprogress library?

When uploading a file to a file field, you are probably accustomed to seeing the default throbber progress indicator:

Throbber upload progress indicator

But this is hardly a progress indicator as it doesn't provide any information regarding progress. With the uploadprogress library installed, a more descriptive progress indicator is now available:

Progress bar upload progress indicator

Note: The progress indicator can be changed under the file field's settings (admin/structure/types/manage/<content type>/fields/<field name>):

Upload progress indicator field setting

Installing the PECL uploadprogress library

First install the gcc, make, php-devel, and php-pear packages:

# yum install gcc make php-devel php-pear

Now install the PECL uploadprogress library:

# pecl install uploadprogress

Next, add "extension=uploadprogress.so" to your php.ini file.

Restart Apache:

# /etc/init.d/httpd restart

Note: This example is for Centos 6, but it should be easily applied to other distributions.

Add new comment