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.