Home  >  Article  >  php教程  >  PHP: 安装Soap扩展

PHP: 安装Soap扩展

WBOY
WBOYOriginal
2016-06-06 19:51:021156browse

Getting SOAP working usually does not require compiling PHP from source. I would recommend trying that only as a last option. For good measure, check to see what your phpinfo says, if anything, about SOAP extensions: $ php - i | grep - i s

Getting SOAP working usually does not require compiling PHP from source. I would recommend trying that only as a last option.

For good measure, check to see what your phpinfo says, if anything, about SOAP extensions:

<code><span>$ php </span><span>-</span><span>i </span><span>|</span><span> grep </span><span>-</span><span>i soap</span></code>

to ensure that it is the PHP extension that is missing.

Assuming you do not see anything about SOAP in the phpinfo, see what PHP SOAP packages might be available to you.

In Ubuntu/Debian you can search with:

<code><span>$ apt</span><span>-</span><span>cache search php </span><span>|</span><span> grep </span><span>-</span><span>i soap</span></code>

or in RHEL/Fedora you can search with:

<code><span>$ yum search php </span><span>|</span><span> grep </span><span>-</span><span>i soap</span></code>

There are usually two PHP SOAP packages available to you, usually php-soap and php-nusoap. php-soap is typically what you get with configuring PHP with --enable-soap.

In Ubuntu/Debian you can install with:

<code><span>$ sudo apt</span><span>-</span><span>get</span><span> install php</span><span>-</span><span>soap</span></code>

Or in RHEL/Fedora you can install with:

<code><span>$ sudo yum install php</span><span>-</span><span>soap</span></code>

After the installation, you might need to place an ini file and restart Apache.

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