Tuesday, September 1, 2009

Building WSF/PHP with PHP 5.3.0

Since the release of PHP5.3.0 number of requests were there inquiring the compatibility of WSF/PHP with PHP 5.3.0.  I tried it out on windows and I only encountered minor issues. These issues are now fixed on the svn trunk. Here is how you can build WSF/PHP from the svn source to use with PHP 5.3.0.

First download both PHP 5.3.0 source and binary distributions from php.net. You will also need to download the binary tools such as bison.exe which are required to build the PHP source.

Next you need to run the buildconf.bat contained with the php source in order to build the windows specific headers.

Now you are ready to build wsf/php for php 5.3.0.

Get the svn source of wsf/php from  https://wso2.org/repos/wso2/trunk/wsf/php.

svn co http://wso2.org/repos/wso2/trunk/wsf/php wsfphp

Now cd to wsfphp directory and open the configure.in file and set php configurations as follows.

PHP_SRC_DIR = E:\php\php-5.3.0
PHP_BIN_DIR = E:\php\php-5.3.0-Win32
BINDLIB_DIR = E:\php\bindlib-cvs-vc8

Of course you need to set the other dependencies according to your machine configurations.

Now run the build.bat file. This will build wsf/php binary for php 5.3.0

6 comments:

  1. Hi:
    I've been trying this. I cannot make the build. What about If you give that build to me (If you want, of course) I would be pleased to you so much. I spent so much time to make work build.bat but I couldn't make It work...

    Do you?

    Thanks a lot

    My email is: majeroji@gmail.com

    ReplyDelete
  2. I have the same problem.
    Compilation finishes with few nmake errors but without wsf.dll.
    I don't understand what I need to do with binary tools?
    Im using VC9, do I need bindlib-cvs-vc8? Where I can find them?
    Do I need some other config/build?

    Help please!
    WSF is only useful PHP web service platform.
    I need it with PHP 5.3

    ReplyDelete
  3. Of course you can mail me on damir.zelenika@gmail.com

    ReplyDelete
  4. You can find relevant php libs from here.

    http://pecl2.php.net/downloads/php-windows-builds/php-libs/

    Can you post the errors you got. I can have a look and give u a fix.

    ReplyDelete
  5. ...

    Could Not Find D:\phpBuild\wso2-wsf-php-src-2.0.0\wsf_c\axis2c\build\deploy\*.manifest

    ...

    d:\phpbuild\wso2-wsf-php-src-2.0.0\src\wsf_policy.h(29) : fatal error C1083: Can
    not open include file: 'rampart_context.h': No such file or directory
    wsf_util.c
    wsf_client.c
    d:\phpbuild\wso2-wsf-php-src-2.0.0\src\wsf_policy.h(29) : fatal error C1083: Can
    not open include file: 'rampart_context.h': No such file or directory
    wsf_worker.c
    d:\phpbuild\wso2-wsf-php-src-2.0.0\src\wsf_policy.h(29) : fatal error C1083: Can
    not open include file: 'rampart_context.h': No such file or directory
    wsf_wsdl.c
    d:\phpbuild\wso2-wsf-php-src-2.0.0\src\wsf_policy.h(29) : fatal error C1083: Can
    not open include file: 'rampart_context.h': No such file or directory
    wsf_xml_msg_recv.c
    d:\phpbuild\wso2-wsf-php-src-2.0.0\src\wsf_policy.h(29) : fatal error C1083: Can
    not open include file: 'rampart_context.h': No such file or directory
    wsf_out_transport_info.c
    wsf_policy.c
    d:\phpbuild\wso2-wsf-php-src-2.0.0\src\wsf_policy.h(29) : fatal error C1083: Can
    not open include file: 'rampart_context.h': No such file or directory
    wsf_stream.c

    ...

    NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN
    \cl.exe"' : return code '0x2'
    Stop.

    ReplyDelete
  6. Hi - I'm trying to get WSF built with php 5.3.13 to run on an wamp setup. I've got the source from github but it doesn't seem to match the folder structure in the build.bat and im getting a load of errors. Any advice please? Ross

    ReplyDelete