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

# PHP 5

I checked again:

C:\herong> php PhpInfo.php > PhpInfo.txt

C:\herong> find /i "soap" PhpInfo.txt

---------- PHPINFO.TXT
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:

SOAP Functions


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.

Table of Contents

 About This Book

 Introduction and Installation of PHP 7.3

 PHP Script File Syntax

 PHP Data Types and Data Literals

 Variables, References, and Constants

 Expressions, Operations and Type Conversions

 Conditional Statements - "if" and "switch"

 Loop Statements - "while", "for", and "do ... while"

 Function Declaration, Arguments, and Return Values

 Arrays - Ordered Maps

 Interface with Operating System

 Introduction of Class and Object

 Integrating PHP with Apache Web Server

 Retrieving Information from HTTP Requests

 Creating and Managing Sessions in PHP Scripts

 Sending and Receiving Cookies in PHP Scripts

 Controlling HTTP Response Header Lines in PHP Scripts

 Managing File Upload

 MySQL Server Connection and Access Functions

 Functions to Manage Directories, Files and Images

SOAP Extension Function and Calling Web Services

 PHP Implementations of SOAP

Turning on the Default SOAP Extension

 Hello_There.php - First Example of SOAP

 SoapClient - SOAP Client Class and Functions

 Hello_There_Dump.php - Debugging SOAP Messages

 What Is WSDL

 Using SOAP Extension in non-WSDL Mode

 SOAP Server Functions and Examples

 Localization Overview of Web Applications

 Using Non-ASCII Characters in HTML Documents

 Using Non-ASCII Characters as PHP Script String Literals

 Receiving Non-ASCII Characters from Input Forms

 "mbstring" Extension and Non-ASCII Encoding Management

 Managing Non-ASCII Character Strings with MySQL Servers

 Parsing and Managing HTML Documents

 Configuring and Sending out Emails

 Image and Picture Processing

 Managing ZIP Archive Files

 Managing PHP Engine and Modules on macOS

 Managing PHP Engine and Modules on CentOS

 Outdated Tutorials


 Full Version in PDF/EPUB