WSO2 WSF/PHP Installation Guide

This document will guide you on how to install WSO2 Web Services Framework/PHP extension and run the server and client samples on Linux and Microsoft Windows operating systems.

Please send your feedback to the user mailing list: wsf-php-user@wso2.org. Kindly see Home page for subscription.

Contents

Common Installation Instructions

To get the distributions working, you need the following installed in your system.

1. Installing and Running on Linux

1. Go to the directory where you have extracted the source distribution. Run the following:

Note: You may require super user privileges to run 'make install' on your system.

2. After installing the extension, you have to edit the php.ini file and add the following line to the php.ini file:
extension=wsf.so

Now you are ready to use WSO2 WSF/PHP.

3. Copy the wsf.php script to your Web server's document root.

4. Also copy all the samples to your Web server's document root.

5. Test with a Web browser; as an example access http://localhost/echo_client.php

NOTES:

2. Installing and Running on Microsoft Windows (win32)

Build PHP on MS Windows

Please refer to README.WIN32-BUILD-SYSTEM file that comes with PHP source distribution.

Build WSO2 WSF/C on MS Windows from Source

Requirements

You need to download following:

Using the Command Prompt

1. If you have Visual Studio command prompt, open it and change directory to "wsf_c/axis2c/build/win32" of the extract folder.

2. If not, create a new shortcut and set target to:
%comspec% /k "C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\vcvars32.bat"

3. Now change directory to "wsf_c/axis2c/build/win32" and edit the configure.in file and set your binary installation locations of libxml2, zlib and iconv libraries.

4. "nmake dist" will build the binary under "wsf_c/axis2c/build" directory.

Building WSO2 WSF/PHP on MS Windows from Source

1. Before trying this, please refer README.WIN32-BUILD-SYSTEM file in PHP source distribution and build PHP source under MS Windows.

2.  Copy wsf_php folder to php_source/ext directory.

3. Run buildconf.bat file to rebuild the configure.js file.

4. "cscript /nologo configure.js --help" will give the configuration options. You will find the option --with-wsf.

5. Add following entries to config.nice.bat file.

    "--with-extra-includes=<Libxml2 bin dir>\include;<iconv bin directory>\include;<zlib bin dir>\include;<wsf-c dir>\include"

    "-- with-extra-libs=<Libxml2 bin dir>\lib;<iconv bin dir>\lib;<zlib bin dir>\lib;<wsf-c dir>\lib"

    "--with-wsf=shared"

6. Run above config.nice.bat file to configure the wsf extension as a dll.

7. "nmake" will build wsf extension.

Installing WSO2 WSF As a PHP Extension

1. If you have built from the source you should now have the wsf_c binary and the wsf.dll.

2. If you have extracted the binary you should have the following structure.

    wso2_wsfphp_1.0.alpha1-bin
                    |
                    +-- wsf_c
                    |
                    +-- wsf.dll

3. Copy wsf.dll to PHP installation directory.

4. Add wsf_c\lib directory to path.

5. Add the following entries to your php.ini file which is in your PHP installation location.

       [wsf]
       wsf.home="\wsf_c"
       wsf.log_path="\wsf_c\logs"

       extension=wsf.dll

6. Create an environment variable PHPRC to point to your php.ini file location.

7. Configure the Apache2 Web server with PHP as follows.

8. Copy php5apache2.dll to Apache2/modules directory. Add following entries in httpd.conf file.

9. LoadModule php5_module modules/php5apache2.dll

10. AddType application/x-httpd-php .php .phtml

11. AddType application/x-httpd-php-source .phps

12. Copy the wsf.php script and all the samples to your Web server's document root

Now you should be able to run the samples in samples directory.