Installing PHP UploadProgress on Mac OS 10.9 Mavericks

Doing this was quite the headache, but here’s how I got it working for Drupal 7.28 on my local machine.


Errors I ran into before figuring this included:

  • configure: error: Please specify the install prefix of iconv with --with-iconv=<DIR>
  • fatal error: 'zend_config.h' file not found
  • Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable. Then, rerun this script.
  • grep: /Applications/MAMP/bin/php/php5.4.10/include/php/main/php.h: No such file or directory
  • First, make sure php, pecl and mysql refer to your MAMP versions.

  • $which php
    /Applications/MAMP/bin/php/php5.4.10/bin/php
    $which mysql
    /Applications/MAMP/Library/bin/mysql
    $which pecl
    /Applications/MAMP/bin/php/php5.4.10/bin/pecl

  • Download your PHP and extract folder to (where 5.x.x is your php version):
  • /Applications/MAMP/bin/php/php5.x.x/include/

  • Rename the folder to:
  • /Applications/MAMP/bin/php/php5.x.x/include/php

  • install autoconf with homebrew (you will need homebrew installed):
  • $ brew install autoconf

  • navigate into the directory where you extracted the php files and run:
  • $ cd /Applications/MAMP/bin/php/php5.x.x/include/php
    $ ./configure --without-iconv

  • install uploadprogress with pecl:
  • sudo pecl install uploadprogress

  • add the following line to php.ini:
  • extension=uploadprogress.so

At the very end of this, I noticed the commented out apc.so line in the MAMP PHP config. This leads me to believe that going with the APC solution may be much less of a headache. Your results may vary.