laravel 致命错误:将 PHP 从 7.0 版升级到 7.2 版后找不到“SoapClient”类
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/48863486/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Fatal error: Class 'SoapClient' not found after upgrading PHP from version 7.0 to 7.2
提问by hadi
I upgraded PHP 7.0to 7.2in Ubuntu. After performing an upgrade, I installed Laravel 5.6.
我在 Ubuntu 中将PHP 7.0升级到7.2。执行升级后,我安装了 Laravel 5.6。
Before the upgrade, class 'SoapClient' is true, but after the upgrade, I encountered
升级前,class 'SoapClient' 为真,但升级后,我遇到了
Fatal error: Class 'SoapClient' not found
致命错误:找不到“SoapClient”类
I checked php.ini
in /etc/php/7.2/apache2/php.ini
but I didn't see extension=php_soap.dll
in php.ini
.
我检查php.ini
的/etc/php/7.2/apache2/php.ini
,但我没有看到extension=php_soap.dll
的php.ini
。
How to resolve this issue?
如何解决这个问题?
回答by mySun
To install SOAP in PHP 7.2 run following in your Ubuntu 16.04 terminal:
要在 PHP 7.2 中安装 SOAP,请在 Ubuntu 16.04 终端中运行以下命令:
- sudo apt-get install php7.2-soap
- sudo service apache2 restart
- 须藤 apt-get 安装 php7.2-soap
- 须藤服务 apache2 重启
回答by Hiren Gohel
Look up the following inside your script file
在脚本文件中查找以下内容
phpinfo();
phpinfo();
Do the following:
请执行下列操作:
1.Locate php.ini
in your apachebin folder, I.e Apache/bin/php.ini
.
Remove the ;
from the beginning of extension=php_soap.dll
1.php.ini
在你的apachebin文件夹中找到,即Apache/bin/php.ini
。;
从开头删除extension=php_soap.dll
2.Restart your Apache server
2.重启你的Apache服务器
EDIT:
编辑:
For your problem you only need to install soap.
对于您的问题,您只需要安装soap。
Run sudo apt-get install php7.2-soap
to install soap and also run sudo service php7.2-fpm restart
and sudo service apache2 restart
and your problem fixed!
运行sudo apt-get install php7.2-soap
安装肥皂和也跑sudo service php7.2-fpm restart
并sudo service apache2 restart
和你的问题解决!
回答by Nileshsinh Rathod
First, check by phpinfo();
This will show you Soap Client
is it enable or not
首先,检查phpinfo();
这将显示您Soap Client
是否启用
If it is disabled Do the following:
如果它被禁用,请执行以下操作:
- Locate php.ini in your apache bin folder, I.e Apache/bin/php.ini
- Remove the ; from the beginning of extension=php_soap.dll
- Restart your Apache server
- Look up your phpinfo(); again and check
- 在 apache bin 文件夹中找到 php.ini,即 Apache/bin/php.ini
- 去除那个 ; 从扩展开始=php_soap.dll
- 重启你的 Apache 服务器
- 查找你的 phpinfo(); 再次检查
If extension=php_soap.dll
not found in your php.ini
follow below steps
如果extension=php_soap.dll
在您php.ini
按照以下步骤未找到
- sudo apt-get install php7.2-soap
- sudo service apache2 restart
- 须藤 apt-get 安装 php7.2-soap
- 须藤服务 apache2 重启