I'm trying a simple web service example and I get this error even though I uncommented extension=php_soap.dll
in the php.ini
file:
Fatal error: Class 'SoapClient' not found in C:\Program Files (x86)\EasyPHP-5.3.9\www\server.php on line 2
I'm trying a simple web service example and I get this error even though I uncommented extension=php_soap.dll
in the php.ini
file:
Fatal error: Class 'SoapClient' not found in C:\Program Files (x86)\EasyPHP-5.3.9\www\server.php on line 2
I couln't find the
SOAP
section inphpinfo()
so I had to install it.For information the
SOAP
extension requires thelibxml
PHP extension. This means that passing in--enable-libxml
is also required according to http://php.net/manual/en/soap.requirements.phpFrom WHM panel
Install SOAP 0.13.0
WARNING: "pear/HTTP_Request" is deprecated in favor of "pear/HTTP_Request2"
install ok: channel://pear.php.net/SOAP-0.13.0
Install HTTP_Request2 (optional)
install ok: channel://pear.php.net/HTTP_Request2
Restart Services » HTTP Server (Apache)
From shell command
1.pear install SOAP
2.reboot
I had to run
as root and restart apache.
That worked! Now my phpinfo() call shows the SOAP section.
To install SOAP in PHP5.6 run following in your Ubuntu 14.04 terminal:
See if SOAP was enabled:
(You should see SOAP between returned text.)
To install SOAP in PHP-7 run following in your Ubuntu terminal:
To install SOAP in PHP-7.1 run following in your Ubuntu terminal:
To install SOAP in PHP-7.2 run following in your Ubuntu terminal:
To install SOAP in PHP-7.3 run following in your Ubuntu terminal:
Diagnose
Look up the following inside your script file
If you can't find
Soap Client
set toenabled
like so:Fix
Do the following:
php.ini
in your apache bin folder, I.eApache/bin/php.ini
;
from the beginning ofextension=php_soap.dll
phpinfo();
again and check if you see a similar picture to the one aboveOn 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.
I solved this issue on PHP 7.0.22-0ubuntu0.16.04.1 nginx