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"


I checked again:

>php PhpInfo.php > PhpInfo.txt

>find /i "soap" PhpInfo.txt
---------- PHPINFO.TXT
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:
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:

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.

Last update: 2015.

Table of Contents

 About This Book

 Introduction and Installation of PHP 7.0

 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

 Configuring and Sending out Emails

 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

 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

 Introduction of Class and Object

 Integrating PHP with Apache Web Server

 Outdated Tutorials


 PDF Printing Version