How do I install Soap?
I got this error:
Fatal error: Class \'SoapClient\' not found in /home/user/mysite.com/path/to/file.php on line 16
How To for Linux Ubuntu...
sudo apt-get install php7.1-soap
Check if file php_soap.ao
exists on /usr/lib/php/20160303/
ls /usr/lib/php/20160303/ | grep -i soap
soap.so
php_soap.so
sudo vi /etc/php/7.1/cli/php.ini
Change the line :
;extension=php_soap.dll
to
extension=php_soap.so
sudo systemctl restart apache2
CHecking...
php -m | more
Please follow the below steps :
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 (by using :
# /etc/init.d/apache2 restart OR
$ sudo /etc/init.d/apache2 restart OR
$ sudo service apache2 restart)
4) Look up your phpinfo();
you may check here as well,if this does not solve your issue:
https://www.php.net/manual/en/soap.requirements.php
In Ubuntu with php7.3:
sudo apt install php7.3-soap
sudo service apache2 restart