PHP Extensions Curl Enable Asynchdns = Yes

Source: Internet
Author: User

1. Download PHP source php-7.0.11

# wget HTTP://CN2.PHP.NET/DISTRIBUTIONS/PHP-7.0.11.TAR.BZ2

2, Installation Php-devel

# yum Install Php-devel-y

3. Compile and install PHP

# CD php-7.0.11/#./configure--prefix=/usr/local/php-7.0.11--disable-debug--enable-shmop--with-gd--with-jpeg-dir= /usr/lib64--with-png-dir=/usr/lib64--with-libxml-dir=/usr/lib64--with-zlib-dir=/usr/lib64--with-mysqli=mysqlnd --with-mysql=mysqlnd--with-pdo-mysql=mysqlnd--enable-sockets--with-iconv--enable-mbstring--enable-mbregex-- Enable-ftp--enable-gd-native-ttf--enable-fpm--enable-pcntl--enable-sysvmsg--enable-sysvsem--ENABLE-SYSVSHM-- Enable-zip--with-freetype-dir # make# make install

4. Compile and install Curl

4.1 Downloads C-ares

# wget https://c-ares.haxx.se/download/c-ares-1.10.0.tar.gz

4.2 Compiling the installation

# Tar XF c-ares-1.10.0.tar.gz# cd c-ares-1.10.0#./configure--prefix=/usr/local/c-ares-1.10.0# make# make install

4.3 Download the warp curl

# wget HTTPS://CURL.HAXX.SE/DOWNLOAD/CURL-7.44.0.TAR.BZ2

4.4 Compiling and installing curl enabling asynchronous support C-ares

# Tar XF curl-7.44.0.tar.bz2# cd curl-7.44.0#./configure--prefix=/usr/local/curl-7.44.0# make# make install# cat vim/e tc/ld.so.conf.d/curl.conf/usr/local/curl-7.44.0/lib/#ldconfig

5. Make php Curl Extension

# CD php-7.0.11/ext/curl#/usr/local/php-7.0.11/bin/phpize#/configure--with-php-config=/usr/local/php-7.0.11/bin /php-config--with-curl=/usr/local/curl-7.44.0/# make# make install# ls/usr/local/php-7.0.11/lib/php/extensions/ No-debug-non-zts-20151012/curl.so

6. See if Asynchdns is enabled

#/usr/local/php-7.0.11/bin/php-i/etc/php.ini | Grep-a Curl Curlcurl support = enabledcurl Information = 7.44.0Age = 3FeaturesAsynchDNS = Yescharconv = Nodebug = Nogss-negotiate = Noidn = YesIPv6 = YESKRB4 = Nolargefile = Yeslibz = YESNTLM = YESNTLMWB = Yesspnego = Nossl = Yessspi = NOTLS-SRP = No


RELATED links:

Http://www.laruence.com/2014/01/21/2939.html Why to enable Asynchdns reason

http://www.haiyun.me/archives/1070.html PHP re-dynamically compiles curl extensions to add asynchronous DNS support C-ares


This article is from the "Trot Empty" blog, be sure to keep this source http://maxingkong.blog.51cto.com/6184921/1956103

PHP Extensions Curl Enable Asynchdns = Yes

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.