How to install php soap extension: first download the "php7.1.27" source code package and decompress it; then execute the command "./configure --enable-soap=shared" to configure PHP and install SOAP; finally modify the php configuration file and add the soap module.
Recommended: "PHP Video Tutorial"
PHP7.1-soap extension installation
1. Download the php7.1.27 source package
cd /root & wget -O php7.1.27.tar.gz http://cn2.php.net/get/php-7.1.27.tar.gz/from/this/mirror
2. Unzip the source package
tar -xvf php7.1.27.tar.gz
3. Enter the directory
cd php7.1.27
4. Configure the PHP installation to Contains SOAP
./configure --enable-soap=shared
NOTE:
If you receive an error similar to the following, you need to install libxml2:
error: xml2-config not found. Please check your libxml2 installation
You can install libxml2 via the yum repository:
yum install libxml2-devel
5. Compile and build
make
6. Copy the soap module to the existing php directory
cp modules/soap.so /usr/lib/php/20160303/soap.so
7. Modify the php.ini configuration file to add the soap module
extension='/usr/lib/php/20160303/soap.so'
8.Restart php-fpm
/etc/init.d/php-fpm restart
The above is the detailed content of PHP7.1-soap extension installation method. For more information, please follow other related articles on the PHP Chinese website!