PHP7.1-soap擴展安裝

1.下載php7.1.27源碼包

cd /root & wget -O php7.1.27.tar.gz http://cn2.php.net/get/php-7.1.27.tar.gz/from/this/mirror

2.解壓源碼包

tar -xvf php7.1.27.tar.gz

3.進入目錄

cd  php7.1.27

4.配置PHP安裝以包含SOAP

./configure --enable-soap=shared

注意:
若是收到相似於如下內容的錯誤,則須要安裝libxml2:php

error: xml2-config not found. Please check your libxml2 installation

您能夠經過yum存儲庫安裝libxml2:php7

yum install libxml2-devel

5.編譯構建

make

6.拷貝soap模塊到現有的php目錄中

cp modules/soap.so /usr/lib/php/20160303/soap.so

7.修改php.ini配置文件加入soap模塊

extension='/usr/lib/php/20160303/soap.so'

8.重啓php-fpm

/etc/init.d/php-fpm restart
相關文章
相關標籤/搜索