How to install php curl on ubuntu: first download the curl installation package; then install cURL; and finally turn on the switch "–with-curl=/usr/local/curl".
Recommendation: "PHP Video Tutorial"
php installation curl extension library under ubuntu
If PHP has been compiled in the system and new extensions need to be added later, one way is to completely recompile PHP, and the other way is to compile the extension library separately and extend it in the form of extension.
Situation 1: New installation of php and curl
First download the curl installation package (I downloaded curl-7.33.0.tar.gz, some versions have problems during compilation, this should Depends on the php version)
Then install cURL
# tar -zxf (此处填下载的curl包名称) # ./configure –prefix=/usr/local/curl # make; make install
When installing php, just turn on the switch –with-curl=/usr/local/curl.
PHP requires that the curl directory must have include and lib directories, and there must be two files easy.h and curl.h under include, and libcurl.a must be under lib. After compilation, the files in the include directory are there, but they may not be in the lib directory yet. It was originally generated in the lib/.libs directory, so it needs to be copied to the lib directory.
Situation 2: PHP has been installed, now you need to add this extension
cd $PHP_PATH/ext/curl (其中$PHP_PATH为php源码安装包目录) phpize ./configure –with-curl=DIR (可以不写dir,如果你的curl安装时没有指定目录) make
The curl.so file will be generated under PHPDIR/ext/curl/moudles/.
Copy the curl.so file to the extensions configuration directory and just modify php.ini
# tar -zxf (此处填下载的curl包名称) # ./configure –prefix=/usr/local/curl # make; make install
The above is the detailed content of How to install php curl on ubuntu. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

SublimeText3 Linux new version
SublimeText3 Linux latest version

SublimeText3 English version
Recommended: Win version, supports code prompts!

Atom editor mac version download
The most popular open source editor
