How to install curl extension in PHP in CentOS

Source: Internet
Author: User
If php has been compiled in the system, you need to add new extensions later. One way is to re-compile php completely, and the other way is to compile the extension Library separately and extend it in the form of extension. The following uses curl extension installation as an example: 1. download the curl installation package. (My php version is 4.4.4 and cannot be used to download the latest curl7.16. The last version is 7.14. so pay attention to the version issue.) If php has been compiled in the system, later, you need to add new extensions. One way is to re-compile php completely, and the other way is to compile the extension Library separately and extend it in the form of extension. The following uses curl extension installation as an example:1. download the curl installation package. (My php version is 4.4.4, and the latest curl 7.16 cannot be downloaded. you can only download 7.14 at last, so pay attention to the version issue)./configure
Makephp requires the curl directory to have the include and lib directories, and the include directory should have the easy. h and curl. h files, and the lib directory should have libcurl.. After compilation, the files under include are available, but the lib directory does not. It was originally generated in the lib/. libs directory, so copy to the lib directory. 2. go to the source code directory for installing the original php, cd ext
Cd curl
Phpize
./Configure -- with-curl = DIR
Make will generate the curl. so file under PHPDIR/ext/curl/moudles. 3. copy the curl. so file to the configuration directory of extensions and modify php. ini.
Related Article

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.