1.windows下
去掉extension=php_soap.dll前的;号重启iis或是apache即。
2.centos下
通过yum安装 yum install php-soap 然后重启apache。
中途如果有报thread.error: can't start new thread 这个错误,则用如下方法解决
编辑 /etc/yum/pluginconf.d/fastestmirror.conf
将enabled=1修改为enabled=0,禁用该功能就可以了。
通过重编译来扩展,则进行如下操作,来源http://www.9enjoy.com/php5-soap-make/
切换到php5安装目录的soap目录cd /soft/php-5.2.8/ext/soap
视php安装目录定
/usr/local/php5/bin/phpize
编译soap.so
./configure --with-php-config=/usr/local/php5/bin/php-config --enable-soap
make
make install
Installing shared extensions: /usr/local/php5/lib/php/extensions/no-debug-zts-20060613/
提示编译后的soap.so文件保存在了/usr/local/php5/lib/php/extensions/no-debug-zts-20060613/目录下。
修改php.ini
vi /usr/local/apache2.2.0/conf/php.ini
如 果之前没有安装过extension,则需要将extension_dir = "./"改为extension_dir = "/usr/local/php5/lib/php/extensions/no-debug-zts-20060613/",如果已经装过,这步之前就 已经改过了。
再其后面加一句:
extension = "soap.so"
重新启动apache,在phpinfo中就有soap的信息了。
Soap Client enabled
Soap Server enabled
在另一台在phpsize时提示了一些错误,不过不影响之后的编译安装。
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20060613
Zend Extension Api No: 220060519
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "zh_CN.GB2312:en_US:en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "zh_CN.GB2312:en_US:en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
留下你的看法: