Fatal error: Class 'SoapClient' not found
Diagnose
Look up the following inside your script file
phpinfo();
If you can't find Soap Client
set to enabled
like so:
Fix
Do the following:
- Locate
php.ini
in your apache bin folder, I.eApache/bin/php.ini
- Remove the
;
from the beginning ofextension=php_soap.dll
- Restart your Apache server
- Look up your
phpinfo();
again and check if you see a similar picture to the one above - If you do, problem solved!
On the other hand if this doesn't solve your issue, you may want to check the requirements for SOAP here. Also in the comment section you can find good advice on connecting to https.
PHP Fatal error: Class 'SoapClient' not found
Unfortunately there is nothing you can do code-wise. You need to contact the server host and have them install the SoapClient extension on the box and re-compile/restart.
PHP Fatal error: Class 'SoapClient' not found in laravel 5.4
PHP Fatal error: Class 'SoapClient' not found in laravel 5.4 means that the SoapClient
class does not been enabled in your server. To do so, follow these steps:
- Check first if it's enabled with
phpinfo()
function and look in the array ifSoapClient
is mentioned enabled. If it's not enabled, follow the second step. - Uncomment the
extension=php_soap.dll
line by removing the semicolon at the beginning, inphp.ini
file. - The next step is to restart your server.
- Now return again to the first step to see if
SoapClient
is now enabled. - At this step, you can now import your class like this:
use SoapClient;
$client = new SoapClient($wsdl, array('soap_version' => SOAP_1_1, 'trace' => true));
PHP Fatal error: Uncaught Error: Class 'SoapClient' not found
Ok, after a lot of trials and research, here is how I resolved it:
sudo a2dismod php7.0
sudo a2enmod php7.2
sudo systemctl restart apache2
Basically, the issue was that my system had two valid versions of PHP and it was configured to use the old one, by these commands you dismod PHP7.0 (disable module) and enmod PHP7.2
Fatal error: Class 'SoapClient' not found after upgrading PHP from version 7.0 to 7.2
To install SOAP in PHP 7.2 run following in your Ubuntu 16.04 terminal:
- sudo apt-get install php7.2-soap
- sudo service apache2 restart
Class 'SoapClient' not found
enable your soap extension in php.
open php.ini find the line have "php_soap" and uncomment this line,
restart web server, problem solved.
Related Topics
Converting a Number With Comma as Decimal Point to Float
How to Fake $_Server['Remote_Addr'] Variable
Difference Between "Include" and "Require" in PHP
Causes of MySQL Error 2014 Cannot Execute Queries While Other Unbuffered Queries Are Active
Posting Form Fields With Same Name Attribute
How to Install MySQLi on Macos
Multiple Files Upload in Codeigniter
Send Value of Submit Button When Form Gets Posted
Finding the Subsets of an Array in PHP
MySQLi_Query() Expects Parameter 1 to Be MySQLi, Object Given
How to Iterate Over the Results in a MySQLi Result Set
Fastest Way to Serve a File Using PHP
How Are Echo and Print Different in PHP
PHP Array Multiple Sort - by Value Then by Key
How to Show Ajax Requests in Url
Get Country of Ip Address With PHP
How to Rely on PHP PHP.Ini Precision Workaround For Floating Point Issue