FAQ for WSF/PHP Installation
Thursday, July 24, 2008
Please have a look at on that and let us know anything else missing there..
Steps to Install WSF/PHP with WAMPServer
Monday, July 21, 2008
People who want WAMPServer to write php in windows (like me) may find this useful. :)
Verify your WSF/PHP installation
Friday, June 13, 2008
1. run the following command in command line ( make sure php is in your 'PATH' environment variable)
php -m
This will lists the php modules. There you should see wsf and xsl. if either or both of this missing, check xsl.dll(or xsl.so in linux) and wsf.dll(or wsf.so in linux) in the extension directory and the php.ini extension entries.
2. Run the following command
php -i
This will list out the configuration details of php installation. Just check the entries like include_path, to check whether you have set scripts directory under it. (In linux you can check this more easily with
php -i | grep include_path
command.
The above tests can be done using the phpinfo function as well. For that you will create a file (say phpinfo.php) in the apache document root with the following script.
phpinfo();
?>
and you call it from the browser (say http://localhost/phpinfo.php). and you have all the details like installed extensions (check xsl and wsf) and their configurations + include_path entries. You can verify your installation with this.
Anyway there may be chances that even though you have all these right but still samples doesn't work. Most probable reason for that result can be that you are upgrading from old wsf/php library and you already have some of old libraries in you PATH. so make sure you delete or move the old libraries to complete seperate place before you install new libraries.
And if still it didn't work just feel free to ask it in the wsf/php forum or the mailing list. Surely there should be a workaround.
PHP Web Services With IIS
Tuesday, April 1, 2008
It is possible for you do deploy PHP Web Services using WSF/PHP in IIS. Following the steps to install WSF/PHP in IIS.
1. Configure PHP With IIS.
You can find a complete guide to installing PHP with IIS from php documentation. http://www.php.net/manual/en/install.windows.iis.php
2. Configure WSF/PHP with PHP
Configuring WSF/PHP with PHP is quite easy. But you have to follow few additional steps to get it working on IIS.
i. Extract wsf/php binary can copy wsf.dll to your php extensions directory.
ii. Set following php.ini settings.
extension_dir=E:\php5\ext { Here my E:\php5 is the location where I have extracted the php binary. Note that I have not used any quotes in the php. If you have paths, It will not work properly.
wsf.home=<path to php binary extract directory>\wsf_c\lib
wsf.log_path=<path to php binary extract directory>\wsf_c\logs
wsf.rm_db_dir=<path to php binary extract directory>\wsf_c\
wsf.log_level=4
iii) add wsf php dependencies and <wsf-php-bin>\wsf_c\lib directory to path System variable
3. Copy the samples, start IIS
Copy the samples directory to C:\Inetpub\webroot directory.
Start IIS with the following command
net start w3svc
Now use the <?php phpinfo(); ?> script to check whether wsf extension is load properly. You can simply copy and paste the above script to a file and put it in to C:\inetpub\webroot directory and try it. If the wsf extension is show in the page then all is fine. If it is not there check whether you have added the dependencies ( Libxml2, iconv) and <wsf-php-bin>\wsf_c\lib directory to the path system variable properly. Sometimes you may need to restart the machine to get these changes to the path to work properly.
Once you have the wsf extension loaded, you can run the samples.
Install WSF/PHP 1.2.1 with zend core in Ubuntu 7.10
Monday, March 17, 2008
2. unzip the installation and run the install script, I used the following command to install it,
sudo ./install -n
3. Now download the relevant wso2 wsf/php deb for the zend core for your os,
from http://dist.wso2.org/products/wsf/php/1.2.1/wso2-wsf-php-1.2.1-ubuntu-7.10-zc.deb
4. You can install the wso2/wsf php by running
dpkg -i wso2-wsf-php-1.2.1-ubuntu-7.10-zc.deb
4. you have to enable xsl extension for php manually editing the php.ini, /usr/local/Zend/Core/etc/php.ini
add the following line to the php.ini,
extension=xsl.so
5. And add the the /usr/local/Zend/Core/lib/php/20060613/wsf_php/scripts directory to the include_path directive of the php.ini
include_path= ".:/usr/local/Zend/Core/lib/php/20060613/wsf_php/scripts"
6. Then copy the /usr/local/Zend/Core/lib/php/20060613/wsf_php/samples directory to the /usr/local/Zend/apache2/htdocs
sudo cp /usr/local/Zend/Core/lib/php/20060613/wsf_php/samples /usr/local/Zend/apache2/htdocs
7. Restart the apache,
/usr/local/Zed/apache2/bin/apachctl restart.
8. Again that's all, open the browser and type http://localhost/samples and click on each link for samples.
9. You have successfully install the wsf/php with Zend Core in Ubuntu 7.10.
Installing WSF/PHP 1.2.1 in ubuntu
1. First update the apt sources list, so we can install all the required packages using apt-get install, Here is a guide to update the apt repository.
http://ubuntuguide.org/wiki/Ubuntu:Gutsy#Updates_and_Upgrades_and_Installing_Software
There you will uncomment the repository list in the /etc/apt/sources.list and run
apt-get update both as the root. (remember to create a backup of the file before editing, so anything go wrong, you have the original)
2. Install PHP by typing
sudo apt-get install php5
3. Install PHP, XSL extension,
sudo apt-get install php5-xsl
4. Install Apache2
sudo apt-get install apache2
5. Then download the wsf/php version 1.2.1 ubuntu 7.10 deb file. Make sure to filter out the correct deb file for your OS. wso2-wsf-php-1.2.1-ubuntu-7.10.deb
6. Install the wso2-wsf-php-1.2.1-ubuntu-7.10.deb by running the following command,
dpkg -i wso2-wsf-php-1.2.1-ubuntu-7.10.deb
7. Put the /usr/lib/php5/20060613+lfs/wsf_php/scripts to the include_path directive of the php.ini. Open the /etc/php5/apache2/php.ini and put the following line,
include_path= ".:/usr/lib/php5/20060613+lfs/wsf_php/scripts"
8. Copy the /usr/lib/php5/20060613+lfs/wsf_php/samples directory to the /var/www
sudo cp -R /usr/lib/php5/20060613+lfs/wsf_php/samples /var/www
9. Hm, that's all I did, then I opened the browser and type http://localhost/samples
10. Just click on each link for samples, and make sure they are working,
If you are using Ubuntu 7.04, You can still follow the same path, but make sure you download the correct WSO2 WSF/PHP package.