Home  >  Article  >  Backend Development  >  Compile and install PHP extension cURL under Linux

Compile and install PHP extension cURL under Linux

WBOY
WBOYOriginal
2016-08-08 09:31:451208browse

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

Unzip:

tar zxvf curl-7.39.0.tar.gz
./configure --prefix=/usr/local/curl
make && make install

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

cd /var/soft/php-5.3.19/ext/curl
/usr/local/php/bin/phpize     注:/usr/local/php 为我的php安装目录
./configure --with-php-config=/usr/local/php/bin/php-config --with-curl=/usr/local/curl/
make && make install

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

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

Restart apache.

The above introduces the cURL compilation and installation of PHP extension under Linux, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

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