Home >Backend Development >PHP Tutorial >Compile and install PHP extension cURL under Linux, linuxcurl_PHP tutorial

Compile and install PHP extension cURL under Linux, linuxcurl_PHP tutorial

WBOY
WBOYOriginal
2016-07-12 08:58:11894browse

Compile and install PHP extension cURL under Linux, linuxcurl

Download cURL http://pan.baidu.com/s/1hqrHWkG (curl-7.39.0.tar.gz) 3.98MB

Unzip:

[plain] view plain copy
  1. tar zxvf curl-7.39.0.tar.gz
  2. ./configure --prefix=/usr/local/curl
[plain] view plain copy
  1. make && make install

After successfully installing curl, enter the source code package of php (non-php installation address)

[plain] view plain copy Compile and install PHP extension cURL under Linux, linuxcurl_PHP tutorialCompile and install PHP extension cURL under Linux, linuxcurl_PHP tutorial
  1. cd /var/soft/php-5.3.19/ext/curl
  2. /usr/local/php/bin/phpize Note: /usr/local/php is my php installation directory
  3. ./configure --with-php-config=/usr/local/php/bin/php-config --with-curl=/usr/local/curl/
  4. make && make install

After success, the directory where curl.so is located will appear

Open php.ini and add extension=xxx/curl.so

Just restart apache.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1104653.htmlTechArticleCompile and install PHP extension cURL under Linux, linuxcurl download cURLhttp://pan.baidu.com/s/1hqrHWkG( curl-7.39.0.tar.gz) 3.98MB Unzip: [plain] view plain copy tarzxvfcurl-7.39.0.tar.gz...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn