如何在CentOS上启用SOAP [英] How to enable SOAP on CentOS
问题描述
我们有CentOS的VPS
我使用以下命令安装了soap。
yum install php-soap
然后我去php.ini取消注释soap扩展。
extension = soap.so
然后我使用以下命令重新启动服务器
service httpd restart
但SOAP尚未启用。 get致命错误:类'SoapClient'
如果我尝试再次安装它。我收到以下消息。
软件包php-soap-5.3.3-27.el6_5.x86_64已安装和最新版本
我试图用以下命令重新配置PHP。
php-config'--disable-fileinfo''--disable-pdo''--enable-bcmath''--enable-calendar' 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'
任何帮助?
$ b对我来说,首先是在Centos中安装soap<$> p $ p>
yum install php-soap
第二,查看soap包是否存在
yum搜索php-soap
第三,因此您必须看到安装的soap包的一些结果,现在在您的终端中的根文件夹中键入命令,特定路径的肥皂位置
find -name soap.so
第四,您将看到其安装/定位的确切路径,只需复制路径并找到添加扩展路径的php.ini
通常,centos 6中的php.ini文件的路径位于
/etc/php.ini
第五,从下面添加一行代码到php.ini文件
extension ='/ usr / lib / php / modules / soap.so'
第六次在Centos中运行apache restart命令。我认为有两个命令可以重新启动您的apache(取其中更容易)
服务httpd重新启动
或
apachectl重新启动
最后,检查浏览器中的phpinfo()输出,您应该看到SOAP部分SOAP CLIENT,SOAP SERVER等已列出并显示为已启用。
We have VPS with CentOS I have installed soap with following command.
yum install php-soap
Then I went to php.ini to un-comment soap extension. It was not there so, I added my own following line.
extension=soap.so
Then i restart server with following command
service httpd restart
But SOAP is still not enabled. as i get 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
I tried to re-configure 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'
Any help?
解决方案For my point of view, First thing is to install soap into Centos
yum install php-soap
Second, see if the soap package exist or notyum search php-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
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,
usually the path of php.ini file in centos 6 is in
/etc/php.ini
fifth, add a line of code from below into php.ini file
extension='/usr/lib/php/modules/soap.so'
and then save the file and exit.
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
OR
apachectl restart
Lastly, check phpinfo() output in browser, you should see SOAP section where SOAP CLIENT, SOAP SERVER etc are listed and shown Enabled.
这篇关于如何在CentOS上启用SOAP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!