我使用 PHP 7.0 Ubuntu 18.10,我无法在 phpinfo() 中启用模块 SoapClient。
我已经删除了“;”在我的 php.ini 配置中并重新启动 apache2 以启用肥皂模块。
extension=php_soap.dll
extension=soap
当我检查 phpinfo() 时,这就是我得到的。
还检查肥皂是否已安装我的服务器。
root@localhost:~# apt-cache search php | grep -i soap
libnusoap-php - SOAP toolkit for PHP
php-soap - SOAP module for PHP [default]
php7.2-soap - SOAP module for PHP
python-pysimplesoap - simple and lightweight SOAP Library (Python 2)
python3-pysimplesoap - simple and lightweight SOAP Library (Python 3)
root@localhost:~#
即使上面的结果,我仍然尝试安装 php7.0-soap,这就是我得到的。
root@localhost:~# sudo apt-get install php7.0-soap
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php7.0-soap
E: Couldn't find any package by glob 'php7.0-soap'
E: Couldn't find any package by regex 'php7.0-soap'
请帮助我。谢谢!
这对我来说也适用 Ubuntu 18 with PHP 7.0
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.2-soap
适用于 Debian 11.php7.0
deb https://packages.sury.org/php/ bullseye main
适时更新
安装php7.0-soap
通过在终端中运行以下命令解决了我的问题:
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.2-soap