Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of installing CURL extension in php in linux

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains the "Linux php installation CURL extension method", the article explains the content is simple and clear, easy to learn and understand, please follow the small series of ideas slowly in-depth, together to study and learn "Linux php installation CURL extension method"!

If php is already compiled on the system, you need to add new extensions later.

One way is to recompile php completely, the other way is to compile the extension library separately and extend it as an extension.

Here's an example of installing curl extensions:

1. Download curl installation package. (My php is 4.4.4, download the latest curl 7.16 can not be used, the last download 7.14 can be, so pay attention to the version problem)

The code is as follows:

./ configure

make

php requires curl directories to have include and lib directories, and easy.h and curl.h files under include, and libcurl.a under lib. After compilation, the files under include are there, but not under lib directory. Originally generated to lib/.libs directory, so copy to lib directory

2. Enter the source directory for installing the original php,

The code is as follows:

cd ext

cd curl

phpize

./ configure --with-curl=DIR

make

The curl.so file will be generated under PHPDIR/ext/curl/moudles/.

3. Copy the curl.so file to the extensions configuration directory and modify php.ini

Thank you for reading, the above is the "Linux php installation CURL extension method" of the content, after learning this article, I believe we have a deeper understanding of the Linux php installation CURL extension method, the specific use of the situation also needs to be verified. Here is, Xiaobian will push more articles related to knowledge points for everyone, welcome to pay attention!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report