我该如何安装Soap?
我收到了这个错误:
@H_403_6@
Fatal error: Class ‘SoapClient’ not found in /home/user/mysite.com/path/to/file.PHP on line 16
我在DreamHost中托管我的网站,他们不支持任何第三方安装.
更新:
我用这个脚本复制了PHP.ini文件:http://sxi.sabrextreme.com/dh-PHPini
我正在使用网站上的API,它说的是这样的:
#######################################################################
## You need to enable the following extensions in your PHP.ini file??##
## PHP_openssl.dll????????? ##
## PHP_soap.dll?????????????##
#######################################################################
这是我的PHP.ini文件具有的扩展名列表:
extension=PHP_bz2.dll
;extension=PHP_cpdf.dll
;extension=PHP_curl.dll
;extension=PHP_dba.dll
;extension=PHP_dbase.dll
;extension=PHP_dbx.dll
;extension=PHP_exif.dll
;extension=PHP_fdf.dll
;extension=PHP_filepro.dll
;extension=PHP_gd2.dll
;extension=PHP_gettext.dll
;extension=PHP_ifx.dll
;extension=PHP_iisfunc.dll
;extension=PHP_imap.dll
;extension=PHP_interbase.dll
;extension=PHP_java.dll
;extension=PHP_ldap.dll
;extension=PHP_mbstring.dll
;extension=PHP_mcrypt.dll
;extension=PHP_mhash.dll
;extension=PHP_mime_magic.dll
;extension=PHP_ming.dll
;extension=PHP_mssql.dll
;extension=PHP_msql.dll
;extension=PHP_MysqL.dll
;extension=PHP_oci8.dll
**extension=PHP_openssl.dll**
;extension=PHP_oracle.dll
;extension=PHP_pdf.dll
;extension=PHP_pgsql.dll
;extension=PHP_shmop.dll
;extension=PHP_snmp.dll
;extension=PHP_sockets.dll
;extension=PHP_sybase_ct.dll
;extension=PHP_tidy.dll
;extension=PHP_w32api.dll
;extension=PHP_xmlrpc.dll
;extension=PHP_xsl.dll
;extension=PHP_yaz.dll
;extension=PHP_zip.dll
问题是,在那里找不到扩展名PHP_soap.dll. 解决方法: 对于Windows
>在PHP.ini中找到extension = PHP_soap.dll或extension = soap,并删除该行开头的注释分号.最后检查conf.d目录下的soap.ini. >重新启动服务器.
对于Linux
Ubuntu的:
PHP7
阿帕奇
sudo apt-get install PHP7.0-soap
sudo systemctl restart apache2
PHP5
sudo apt-get install PHP-soap
sudo systemctl restart apache2
OpenSuse当中:
PHP7
阿帕奇
sudo zypper in PHP7-soap
sudo systemctl restart apache2
Nginx的
sudo zypper in PHP7-soap
sudo systemctl restart Nginx
(编辑:北几岛)
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!
|