This document guides you on how to install the 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.
To get the distributions working, you need the following installed in your system.
If you are using a pre-installed version of PHP, please make sure that you have the developer version installed, so that you can compile the WSO2 WSF/PHP source.
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 scripts folder 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. For example, access
Notes:
Please refer to the README.WIN32-BUILD-SYSTEM file that comes with the PHP source distribution.
You need to download the following:
1. If you have the Visual Studio command prompt, open it and change
directory to wso2-wsf-php 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 wso2-wsf-php-src, extract directory, and edit
the configure.in file. Then set your binary installation locations of
libxml2, zlib and iconv , OpenSSL
4.Also, you need to specify the PHP source directory and its binary build location to build the extension along with wsf_c. Please fill the following entries in configure.in file. PHP_SRC_DIR, PHP_BIN_DIR and WIN32BUILD_DIR.
5.Once you have done it, run build.bat file in the wso2-wsf-php-src extract directory. This will build the binary distribution.
1. Before trying this, please refer to the README.WIN32-BUILD-SYSTEM file in the PHP source distribution, and build the 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 the 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 the above config.nice.bat file to configure the wsf extension as a dll.
7. "nmake" will build the wsf 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-wsf-php-bin-1.1.0-win32 | +-- wsf_c | +-- wsf.dll
3. Copy wsf.dll to the PHP installation directory.
4. Add wso2-wsf-php-bin-1.1.0-win32\wsf_c\lib directory to the PATH environment variable.
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" wsf.log_level=3 extension=wsf.dll
6. Configure the Apache2 Web server with PHP as follows.
7. Copy php5apache2.dll to Apache2/modules directory.
Add the following entries in httpd.conf file.
8. LoadModule php5_module modules/php5apache2.dll
9. PHPIniDir " < your php.ini file location> "
10. AddType application/x-httpd-php .php .phtml
11. AddType application/x-httpd-php-source .phps
12. Copy the scripts folder and all the samples to your Web server's document root.
Now you should be able to run the samples in the samples directory.