PHP Tutorials - Herong's Tutorial Examples - Version 4.20, 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:
C:\herong> type PhpInfo.php <?php phpinfo();?> C:\herong> php PhpInfo.php > PhpInfo.txt C:\herong> find /i "soap" PhpInfo.txt ---------- PHPINFO.TXT C:\herong> php -v PHP 7.3.0 (cli) (built: Dec 6 2018 01:54:19) ( ZTS MSVC15 ... Copyright (c) 1997-2018 The PHP Group Zend Engine v3.3.0-dev, Copyright (c) 1998-2018 Zend Technologies
So SOAP function is not available in my default installation, which is PHP 7.3.0 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" ... # PHP 7 extension=soap # PHP 5 extension=php_soap.dll
I checked again:
C:\herong> php PhpInfo.php > PhpInfo.txt C:\herong> find /i "soap" PhpInfo.txt ---------- PHPINFO.TXT soap Soap Client => enabled Soap Server => enabled soap.wsdl_cache => 1 => 1 soap.wsdl_cache_dir => /tmp => /tmp soap.wsdl_cache_enabled => 1 => 1 soap.wsdl_cache_limit => 5 => 5 soap.wsdl_cache_ttl => 86400 => 86400
Cool. Some settings related to SOAP showed up now.
To check who developed this implementation, 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: 7.3.0 Copyright (c) 1997-2018 The PHP Group
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: 2019.
Table of Contents