如何在 CentOS 上启用 SOAP

How to enable SOAP on CentOS(如何在 CentOS 上启用 SOAP)
本文介绍了如何在 CentOS 上启用 SOAP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

我们有 CentOS 的 VPS.我已经使用以下命令安装了 SOAP:

We have VPS with CentOS. I have installed SOAp using the following command:

$ yum install php-soap

然后我转到 php.ini 文件以取消对 SOAP 扩展的注释.它不在那里,所以我添加了以下行:

Then I went to the php.ini file to uncomment the SOAP extension. It was not there, so I added the following line:

extension=soap.so

然后我通过运行重新启动服务器

Then I restarted the server by running

$ service httpd restart

但 SOAP 仍未启用.我收到 Fatal error: Class 'SoapClient' 消息.

如果我再次尝试安装它,我会收到以下消息:

If I try to install it again, I get following message:

Package php-soap-5.3.3-27.el6_5.x86_64 already installed and latest version

我也尝试使用以下命令重新配置 PHP:

I tried to reconfigure PHP with following command as well:

$ php-config '--disable-fileinfo' '--disable-pdo' '--enable-bcmath' '--enable-calendar' '--enable-ftp' '--enable-libxml' '--enable-sockets' '--prefix=/usr/local' '--with-apxs2=/usr/local/apache/bin/apxs' '--with-curl=/opt/curlssl/' '--with-imap=/opt/php_with_imap_client/' '--with-imap-ssl=/usr' '--with-kerberos' '--with-libdir=lib64' '--with-libxml-dir=/opt/xml2/' '--with-mysql=/usr' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-openssl=/usr' '--with-openssl-dir=/usr' '--with-pcre-regex=/opt/pcre' '--with-pic' '--with-zlib' '--with-zlib-dir=/usr' '--enable-soap'

有什么帮助吗?

推荐答案

就我的观点而言,首先要在 Centos 中安装soap

For my point of view, First thing is to install soap into Centos

yum install php-soap


二、查看soap包是否存在


Second, see if the soap package exist or not

yum search php-soap

第三,因此您必须看到您安装的soap包的一些结果,现在在根文件夹中的终端中键入命令以搜索特定路径的soap位置

third, thus you must see some result of soap package you installed, now type a command in your terminal in the root folder for searching the location of soap for specific path

find -name soap.so

第四,你会看到它安装/定位的确切路径,只需复制路径并找到php.ini添加扩展路径,

fourth, you will see the exact path where its installed/located, simply copy the path and find the php.ini to add the extension path,

通常centos 6中php.ini文件的路径在

usually the path of php.ini file in centos 6 is in

/etc/php.ini

第五,从下面添加一行代码到php.ini文件中

fifth, add a line of code from below into php.ini file

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

然后保存文件并退出.

第六次在Centos中运行apache restart命令.我认为有两个命令可以重启你的 apache(以你更容易的为准)

sixth run apache restart command in Centos. I think there is two command that can restart your apache ( whichever is easier for you )

service httpd restart

apachectl restart

最后,检查浏览器中的 phpinfo() 输出,您应该看到 SOAP 部分,其中列出了 SOAP CLIENT、SOAP SERVER 等并显示为已启用.

Lastly, check phpinfo() output in browser, you should see SOAP section where SOAP CLIENT, SOAP SERVER etc are listed and shown Enabled.

这篇关于如何在 CentOS 上启用 SOAP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

相关文档推荐

DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)