Installing the PEAR/PECL uploadprogress extension for Drupal 7

Trying out the latest development snapshot of Drupal 7, I noticed it supports the uploadprogress PEAR/PECL extension, which apparently lets you see the actual progress (with some kind of Ajaxy widget) while uploading files. Sounds cool to me.

First, I installed PEAR (on my Ubuntu testing server):

$ sudo aptitude install php-pear

and then tried to use PEAR to install uploadprogress:

$ sudo pear install pecl/uploadprogress
downloading uploadprogress-1.0.1.tgz ...
Starting to download uploadprogress-1.0.1.tgz (8,536 bytes)
.....done: 8,536 bytes
4 source files, building
running: phpize
sh: phpize: not found
ERROR: `phpize' failed

PHPize? What’s that? There’s no phpize package; aptitude search phpize gives nothing.

A bit of digging and I found that PHPize is part of the php5-dev package! After installing that, pecl can install a module just fine:

Solution

$ sudo apt-get install php5-dev
$ sudo pear install pecl/uploadprogress

After lots of output, PEAR left a final clue:

configuration option "php_ini" is not set to php.ini location
You should add "extension=uploadprogress.so" to php.ini

So I created /etc/php/conf.d/uploadprogress.ini, containing just this line:

extension=uploadprogress.so

I restarted Apache and now Drupal 7 reports “UPLOAD PROGRESS: Enabled”. Now to try it out….!

Share and Enjoy:
  • Reddit
  • Digg
  • Twitter
  • Slashdot
  • StumbleUpon
  • Google Bookmarks
  • Facebook
  • E-mail this story to a friend!
  • Print this article!
Posted on Wednesday, September 16th, 2009 at 11:43 pm and is filed under System administration. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a reply

Name (*)
Mail (will not be published) (*)
URI
Comment