How install PECL uploadprogress in PHP?


uploadprogress is a PHP extension used by scripts to display progress of the files being uploaded. For example the very popular Drupal CMS recommends using PECL uploadprogress extension.

You might be wondering how to install it when Drupal complains it doesn't see this extension?


You can install the uploadprogress PHP extension by using the PECL extension manager. In most Linux distributions simply launch the following command in the command line to get uploadprogress installed:

pecl install uploadprogress

You'll also need to enable the extension, so that it's recognised by your PHP/Apache instance. On a Debian machine simply create a new file called uploadprogress.ini in /etc/php5/mods-available with the following text in it:

and finally enable the extension by running:

sudo php5enmod uploadprogress

and restart Apache:

sudo service apache2 restart

Remember that prior to installing the uploadprogress extension you also need to install the phpize utility, that is part of the php5-dev package on Debian.

If your using a different Linux flavour please do check your packet manager to find and install the appropriate package.

Note: If you're on Drupal you can go to to check your PHP's installation status and verify if the uploadprogress extension has been successfully enabled. Of course, replace with your actual domain name :)