Home  >  Article  >  Backend Development  >  PHP installs new extension library_PHP tutorial

PHP installs new extension library_PHP tutorial

WBOY
WBOYOriginal
2016-07-14 10:09:48825browse

When building the LAMP environment, apache and php were installed manually by myself, and only the default extension library of php was installed. It was only when curl was used that I discovered that the curl extension library was not loaded.

I have to install it manually.

1. Switch to the php source code folder I downloaded.

cd php5.3.10

2. Enter curl’s extension library

cd ext/curl

3. Execute the command (my php is compiled and installed and placed in the /usr/local/php file)

/usr/loca/php/bin/phpize

4. Execute the command to configure curl

./configure --with-php-config=/usr/loca/php/bin/php-config

The --with-php-config option must be added. If not, an error message of php-config not found will be reported

5.make & make install

6. After completion, a curl.so file will be generated under /usr/local/php/lib/php/extensions/no-debu-non-zts-XXXXX

Copy the curl.so file to the /usr/loca/php/lib/php/extensions folder (you don’t have to copy it)

7. Add the instruction to enable the curl extension library in the php.ini configuration file

extension=/usr/local/php/lib/php/extensions/curl.so

8. Restart the apache service and the curl function can be used.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/477610.htmlTechArticleWhen building the LAMP environment, apache and php were installed manually, and only the default extension of php was installed. library. When using curl, I found that the curl extension library was not loaded. I had to install it manually...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn