Here are the instructions from another PAIR user

http://www.pairusers.com/?HowToInstallPHP4

We have the directory phpsrc already.

cd php4.3.10

nice ./configure \
         --with-gd=/usr/local \
         --with-mysql=/usr/local \
         --with-config-file-path=/usr/home/irisdev/phpini \
         --enable-debug=no \
         --enable-track-vars=yes \
         --enable-ftp=yes \ 
         --enable-force-cgi-redirect=yes \
        --with-zlib-dir=/usr/local \
       --with-mcrypt \
       --with-curl \

I have modified ext/curl/curl.c to remove a couple of identifiers that are not in the current curl libraries.