Fatal error: Class 'SoapClient' not found after upgrading PHP from version 7.0 to 7.2

心不动则不痛 提交于 2020-01-03 20:13:56

问题


I upgraded PHP 7.0 to 7.2 in Ubuntu. After performing an upgrade, I installed Laravel 5.6.

Before the upgrade, class 'SoapClient' is true, but after the upgrade, I encountered

Fatal error: Class 'SoapClient' not found

I checked php.ini in /etc/php/7.2/apache2/php.ini but I didn't see extension=php_soap.dll in php.ini.

How to resolve this issue?


回答1:


To install SOAP in PHP 7.2 run following in your Ubuntu 16.04 terminal:

  1. sudo apt-get install php7.2-soap
  2. sudo service apache2 restart



回答2:


Look up the following inside your script file

phpinfo();

Do the following:

1.Locate php.ini in your apache bin folder, I.e Apache/bin/php.ini. Remove the ; from the beginning of extension=php_soap.dll

2.Restart your Apache server

EDIT:

For your problem you only need to install 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!




回答3:


First, check by phpinfo(); This will show you Soap Client is it enable or not

If it is disabled Do the following:

  1. Locate php.ini in your apache bin folder, I.e Apache/bin/php.ini
  2. Remove the ; from the beginning of extension=php_soap.dll
  3. Restart your Apache server
  4. Look up your phpinfo(); again and check

If extension=php_soap.dll not found in your php.ini follow below steps

  1. sudo apt-get install php7.2-soap
  2. sudo service apache2 restart


来源:https://stackoverflow.com/questions/48863486/fatal-error-class-soapclient-not-found-after-upgrading-php-from-version-7-0-t

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!