Install PHP extensions from source code compilation

Source: Internet
Author: User
When I used curl today, I found that no extensions were installed when I installed PHP. I installed PHP using the source code, here we will use the source code compilation method to install the extension. 1 first go to the php source package cdhomebanditdownloadsoftwarephp-5.5.25extgettext2 under the curl folder Production

When I used curl today, I found that no extensions were installed when I installed PHP. I installed PHP using the source code, here we will use the source code compilation method to install the extension. 1 first go to the php source package cd/home/bandit/download/software/php-5.5.25/ext/gettext 2 under the curl folder

When I used curl today, I found that no extensions were installed when I installed PHP. I installed PHP using the source code, here we will use the source code compilation method to install the extension.

1. First, go to the php source code package.
Cd/home/bandit/downloads/software/php-5.5.25/ext/gettext
2. Generate the configure file in the curl folder
/Opt/php/bin/phpize
3. Configure Compilation
./Configure-with-php-config =/opt/php/bin/php-config-with-curl
Make & make install
4. Generate a gettext. so file under/usr/local/php/extensions.
5. Determine the extension_dir =/opt/php/lib/php/extensions and extension = curl. so in the php. ini file.

Enter php-m on the terminal. Then, you can see the curl extension in the displayed installation extension.

After learning this method, you can compile the extension directly from the source code, and you don't have to worry about finding the extension file any more.

Original article address: Compile and install the PHP extension from the source code. Thank you for sharing it with the original author.

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.