If PHP is already compiled on the system, then you need to add a new extension.
One way is to recompile PHP completely, another way is to compile the extensions separately, in extension form.
The following is 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, so pay attention to the version of the problem)
The code is as follows:
./configure
Make
PHP Requirements Curl directory to have include and Lib directory, and include the Easy.h and curl.h two files, under the Lib to have LIBCURL.A. The file with the compiled include is available, but there is no Lib directory. Originally generated to the Lib/.libs directory, so to copy to the Lib directory
2, into the installation of the original PHP source directory,
The code is as follows:
CD ext
CD Curl
Phpize
./configure--with-curl=dir
Make
The curl.so file is generated under phpdir/ext/curl/moudles/.
3, copy curl.so file to extensions configuration directory, modify the php.ini is good