Build PHP with AsyncDNS enabled

From Wiki
Jump to: navigation, search
Install c-ares:

wget http://c-ares.haxx.se/download/c-ares-1.10.0.tar.gz
tar xvzf c-ares-1.10.0.tar.gz
cd c-ares-1.10.0/
./configure
make
make install

Install curl to /usr/local:

wget http://curl.haxx.se/download/curl-7.32.0.tar.bz2
tar jxvf ./curl-7.32.0.tar.bz2
rm -f ./curl-7.32.0.tar.bz2
cd /usr/local/src/curl-7.32.0
./configure --enable-ares
make
make install

Update build options for PHP:

echo "--with-curl=/usr/local/lib" >> /var/cpanel/easy/apache/rawopts/all_php5

Rebuild:

/scripts/easyapache --build

Check phpinfo() for AsynchDNS.  Should say yes.