如何在Linux上的php中启用--enable-soap? [英] How do I enable --enable-soap in php on linux?

查看:302
本文介绍了如何在Linux上的php中启用--enable-soap?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这就是很多问题.我在Apache上具有PHP 5.2.9,并且无法升级PHP.我有办法在PHP 5.2.9中启用SOAP吗? PHP手册说要启用SOAP支持,请使用--enable-soap配置PHP"完全没有帮助.我该如何配置?

That's much the question. I have PHP 5.2.9 on Apache and I cannot upgrade PHP. Is there a way for me to enable SOAP in PHP 5.2.9? The PHP manual did not help at all when it said, "To enable SOAP support, configure PHP with --enable-soap ." How do I configure?

推荐答案

使SOAP正常工作不需要从源代码编译PHP.我建议仅尝试将其作为最后的选择.

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

作为一个很好的衡量标准,请检查您的phpinfo关于SOAP扩展的内容(如果有的话):

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

$ php -i | grep -i soap

确保缺少PHP扩展名.

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

假设您在phpinfo中没有看到有关SOAP的任何信息,请查看可能有哪些PHP SOAP软件包可用.

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

在Ubuntu/Debian中,您可以使用以下命令进行搜索:

In Ubuntu/Debian you can search with:

$ apt-cache search php | grep -i soap

或在RHEL/Fedora中,您可以使用以下方式进行搜索:

or in RHEL/Fedora you can search with:

$ yum search php | grep -i soap

通常有两个PHP SOAP包可供您使用,通常为php-soapphp-nusoap. php-soap通常是使用--enable-soap配置PHP的结果.

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.

在Ubuntu/Debian中,您可以安装:

In Ubuntu/Debian you can install with:

$ sudo apt-get install php-soap

或者在RHEL/Fedora中,您可以安装:

Or in RHEL/Fedora you can install with:

$ sudo yum install php-soap

安装后,您可能需要放置一个ini文件并重新启动Apache.

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

这篇关于如何在Linux上的php中启用--enable-soap?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆