More and more scripts are requiring the use of curl within PHP. As curl is already available on Mac OS X adding it to the PHP build becomes very simple. Almost to simple to mention here but here it is:

Recompile the php installation as described on this page: Compiling PHP.

The only change you need to make is to add:

--with-curl \

To the configure statement and it will include this library for you.

For example:

./configure --prefix=/usr/local/php5 \
  --mandir=/usr/share/man \
  --infodir=/usr/share/info \
  --sysconfdir=/etc \
  --with-config-file-path=/etc \
  --with-zlib \
  --with-zlib-dir=/usr \
  --with-openssl \
  --without-iconv \
  --enable-exif \
  --enable-ftp \
  --enable-mbstring \
  --enable-mbregex \
  --enable-sockets \
  --with-mysql=mysqlnd \
  --with-pdo-mysql=mysqlnd \
  --with-mysqli=mysqlnd \
  --with-curl \
  --with-apxs2=/usr/local/apache2/bin/apxs