PECL Upload Progress Bar Installation

progressWell, I did this a while ago on a server I built up to host Drupal sites... and recently I switched VPS providers to Rimu Hosting (big plug for these guys, the support is incredible, the prices reasonable and the experience is top-notch - check them out) so had to do it again, but I'd completely forgotten how I did it... so I did some google-work and found the info I needed spread around a bit so I've compiled it here as much for my own reference as anyone elses.

First of all, its worth updating Pear (mine didn't work until I had done this):

pear update PEAR

Then you will want to obtain the latest PECL uploadprogress package (1.0.1 at the time of writing, but the download page is here to check for newer versions), extract it and build it:

cd /tmp
tar -zxvf uploadprogress-1.0.1.tgz
cd uploadprogress-1.0.1.tgz
sudo phpize
sudo ./
sudo make
sudo make install

The last line output by the make install command will be something like this:

Installing shared extensions:     /usr/lib/php5/20060613+lfs/

Copy the path (it will be different on your system probably), you will probably need it (In a Linux shell, normally just highlighting text will copy it... right clicking will paste it again... CTRL-C and CTRL-V will not normally work).

Now edit your php.ini file using whatever editor you prefer - I use vim because it works out of the box on Ubuntu, where vi seems to exhibit some odd behaviours at times.

On an Ubuntu or Debian server running Apache2, the php.ini file will probably be here:

vim /etc/apache2/php5/php.ini

And search for a line with extension_dir and change the path to the one we copied above (so in my case, the line becomes):

extension_dir = /usr/lib/php5/20060613+lfs/

If you don't find that parameter in the ini file, then just add it at the bottom.  Then you need to add another line to enable the upload progress extension:

extension =

And we're almost done.  Just restart Apache and it should just work:

/etc/init.d/apache2 restart

I hope this helps someone - let me know with a comment if it worked for you (or, alternatively if it didn't).



sooooooooooo hard to

sooooooooooo hard to implement this...

Thank you.

thank you thank you thank you.

Worked like a dream. Just had to make sure to get all of their example files in th right place and it worked on the first shot.


Thats great, I was wondering how to get this working...

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <drupal6>, <html>, <java>, <javascript>, <php>, <python>. The supported tag styles are: <foo>, [foo], [[foo]].
  • Syntax highlight code surrounded by the <pre class="brush: lang">...</pre> tags, where lang is one of the following language brushes: bash, cpp, css, jscript, java, php, python.

More information about formatting options

This question is to prevent automated spam submissions. Upper or lower case does not matter. If you can't read it properly, just submit what you believe it says and if its wrong you will be presented with a new captcha image.
Enter the characters shown in the image.