WSO2 WSF PHP installation issues
Since WSO2 WSF PHP is the only library that supports file attachements and WSDL generation we decided to stick on this.
That was really hard to compile and have it working, may be because of we tried to do that on Mac OS.
- Download and extract WSO2 WSF PHP in right place initially since it use initial sources(you will need to keep them) after compilation and I had lot of problems in order to move it and finally decided to recompile.
- link gcc to gcc-4.0 instead of 4.2 (sudo ln -fs /usr/bin/gcc-4.0 /usr/bin/gcc)
- ./configure MACOSX_DEPLOYMENT_TARGET=10.6 CFLAGS=”-arch i386 -g -Os -pipe -no-cpp-precomp” CCFLAGS=”-arch i386 -g -Os -pipe” CXXFLAGS=”-arch i386 -g -Os -pipe” LDFLAGS=”-arch i386 -bind_at_load” ‘CPPFLAGS=-DHAVE_GETIFADDRS’
- If you will not specify php extension path during ./configure it will take default one using php-config. If you are running Zend Server CE than it will be problem for you since compilation somehow link your .so to initial compilation place. (You could also symlink php-config to zend/bin/php-config as we did in our case).
- make, sudo make install - this will compile wsf.so and wsf_c and will put them into zend/lib/php_extensions folder
- You will need to point wsf.home to zend/lib/php_extensions/wsf_c (my one looks like this /usr/local/zend/lib/php_extensions/wsf_c) - it was not working for me until I set wsf.home
- Restart Apache
- Use samples/ located in initial source package in order order to test WSF PHP. You could copy them in any place, and they will work.
- You will need to put wso2-wsf-php-src-2.1.0/scripts into include_path in order to have WSDL generation working.
- WSDL generations was not working for me even after showing scripts folder in include path and after an hour I figured out that It’s not looking into wsf.php (which is located in scripts folder executed in strange way so that it’s not able to see scripts in include path)
In function ws_generate_wsdl() it tries to require few files to generate ( WSDL require_once(”wsdl/WS_WSDL_Creator.php”); ). I have it working after setting full paths in all require_onces in this function.