How to install curl extension in PHP in CentOS
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 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.