PHP Tutorials - Herong's Tutorial Examples - Version 4.17, by Dr. Herong Yang
Turning on the Default SOAP Extension
This section provides a tutorial example on how to turn on the SOAP extension inluded in the default distribution package - extension=php_soap.dll in the php.ini file.
The PHP distribution package comes with a default SOAP extension library. But it is not turned on automatically. I did the following test to see if SOAP turned on or not with the phpinfo() function:
>type PhpInfo.php <?php phpinfo();?> >php PhpInfo.php > PhpInfo.txt >find /i "soap" PhpInfo.txt ---------- PHPINFO.TXT >php -v PHP 5.6.6 (cli) (built: Feb 18 2015 16:02:19) Copyright (c) 1997-2015 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
So SOAP function is not available in my default installation, which is PHP 5.0.4 by The PHP Group.
The next thing I did is to to turn on the SOAP extension by editing \php\php.ini and update the following lines:
; Directory in which the loadable extensions (modules) reside. extension_dir = "ext" ... extension=php_soap.dll
I checked again:
>php PhpInfo.php > PhpInfo.txt >find /i "soap" PhpInfo.txt ---------- PHPINFO.TXT soap Soap Client => enabled Soap Server => enabled soap.wsdl_cache_dir => /tmp => /tmp soap.wsdl_cache_enabled => 1 => 1 soap.wsdl_cache_ttl => 86400 => 86400
Cool. Some settings related to SOAP showed up now.
The next question is what SOAP implementation is this php_soap.dll. Is it PEAR SOAP, NuSOAP, or something else? To check this out, I right-mouse clicked on the file \php\ext\php_soap.dll, and selected Properties. The pop up window told me this:
Internal Name: php_soap.dll File Version: 188.8.131.52 Copyright (c) 1997-2014 The PHP Group
So the php_soap.dll is indeed another PHP implementation of SOAP. Let's call it the PHP Group SOAP. I then browsed the installed documentation at \php\html\intro.soap.html, and got the following information:
The SOAP extension can be used to write SOAP Servers and Clients. It supports subsets of SOAP 1.1, SOAP 1.2 and WSDL 1.1 specifications.
Last update: 2015.
Table of Contents