如何在 PHP 7.0 Ubuntu 18.10 中启用 SoapClient

问题描述 投票:0回答:3

我使用 PHP 7.0 Ubuntu 18.10,我无法在 phpinfo() 中启用模块 SoapClient。

我已经删除了“;”在我的 php.ini 配置中并重新启动 apache2 以启用肥皂模块。

extension=php_soap.dll
extension=soap

当我检查 phpinfo() 时,这就是我得到的。

enter image description here

还检查肥皂是否已安装我的服务器。

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'

请帮助我。谢谢!

php ubuntu soap soap-client
3个回答
5
投票

这对我来说也适用 Ubuntu 18 with PHP 7.0

sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.2-soap

0
投票

适用于 Debian 11.php7.0

/etc/apt/sources.list.d/php.list
deb https://packages.sury.org/php/ bullseye main

适时更新

安装php7.0-soap


-3
投票

通过在终端中运行以下命令解决了我的问题:

  1. sudo add-apt-repository ppa:ondrej/php

  2. sudo apt-get update

  3. sudo apt-get install php7.2-soap

© www.soinside.com 2019 - 2024. All rights reserved.