{"id":26,"date":"2008-01-12T22:52:00","date_gmt":"2008-01-12T22:52:00","guid":{"rendered":"http:\/\/www.mohanjith.net\/wordpress\/?p=26"},"modified":"2008-01-12T22:52:00","modified_gmt":"2008-01-12T22:52:00","slug":"wso2-wsfphp-with-lighttpd","status":"publish","type":"post","link":"https:\/\/mohanjith.net\/blog\/2008\/01\/wso2-wsfphp-with-lighttpd.html","title":{"rendered":"WSO2 WSF\/PHP with Lighttpd"},"content":{"rendered":"<p>I wanted to test drive <a href=\"http:\/\/wso2.org\/projects\/wsf\/php\">WSO2 WSF\/PHP<\/a> on <a href=\"http:\/\/www.lighttpd.net\/\">Lighttpd<\/a> because I couldn&#8217;t find any documentation specific for Lighttpd, or any one complaining that it cannot be done. I set up a new VMWare image running Debian so that I can blog all the steps involved in getting WSO2 WSF\/PHP working on Lighttpd running on Debian.<\/p>\n<p>Step 1: Install Lighttpd, PHP5<\/p>\n<p>I used apt-get to install Lighttpd and PHP5<\/p>\n<pre> $ sudo apt-get install lighttpd php5 <\/pre>\n<p>Step 2: Download and install WSO2 WSF\/PHP.<\/p>\n<p>I downloaded the Debian package.<\/p>\n<pre> $ axel -an 5 http:\/\/dist.wso2.org\/products\/wsf\/php\/wso2-wsf-php-1.2.0-debian.deb<br \/> $ dpkg -i wso2-wsf-php-1.2.0-debian.deb<\/pre>\n<p>Step 3: Enable WSO2 WSF\/PHP<\/p>\n<p>I created a new file \/etc\/php5\/conf.d\/wsf.ini and added the following line.<\/p>\n<pre> extension=wsf.so <\/pre>\n<p> Step 4: Enable FastCGI and PHP<\/p>\n<p>Fastest method to run PHP on Lighttpd is FastCGI, so we will be enabling FastCGI.<\/p>\n<pre> $ sudo lighty-enable-mod fastcgi<\/pre>\n<p>On Debian Lighttpd FastCGI configuration file contains the configuration for PHP4. We will have to edit \/etc\/lighttpd\/conf-enable\/10-fastcgi.conf to look like bellow.<\/p>\n<pre>server.modules   += ( \"mod_fastcgi\" )<br \/><br \/>## Start an FastCGI server for php5 (needs the php5-cgi package)<br \/>fastcgi.server    = ( \".php\" =><br \/>     ((<br \/>             \"bin-path\" => \"\/usr\/bin\/php5-cgi\",<br \/>             \"socket\" => \"\/tmp\/php.socket\",<br \/>             \"max-procs\" => 2,<br \/>             \"idle-timeout\" => 20,<br \/>             \"bin-environment\" => (<br \/>                     \"PHP_FCGI_CHILDREN\" => \"4\",<br \/>                     \"PHP_FCGI_MAX_REQUESTS\" => \"10000\"<br \/>             ),<br \/>             \"bin-copy-environment\" => (<br \/>                     \"PATH\", \"SHELL\", \"USER\"<br \/>             ),<br \/>             \"broken-scriptfilename\" => \"enable\"<br \/>     ))<br \/>)<\/pre>\n<p>Step 5: Restart Lighttpd<\/p>\n<p>You have to reload the Lighttpd configuration files.<\/p>\n<pre> $ sudo \/etc\/init.d\/lighttpd restart<\/pre>\n<p> You have successfully installed WSO2 WSF\/PHP on PHP5 and Lighttpd. It is time to test whether it is a success. Simplest approach would be to see <code>phpinfo()<\/code> page. Create a php file with the following line of code and place it in the document root. Then using a web browser goto that URL. In the page search for wsf section. This contains all the configurations about the WSF extension.<\/p>\n<p>I went throught to the trouble of actually consuming a SOAP web service to see whether this setup actually works and it was a success, but that is simply out of the scope of this post. These instructions should work on other Linux distributions with minor changes and any platform with few changes.<\/p>\n<p>Fly WSO2 WSF\/PHP with Lighttpd. Have fun.<\/p>\n<div id=\"fb-like\" style=\"\"><iframe src=\"http:\/\/www.facebook.com\/plugins\/like.php?href=https:\/\/mohanjith.net\/blog\/2008\/01\/wso2-wsfphp-with-lighttpd.html&amp;layout=standard&amp;show_faces=true&amp;width=300&amp;action=like&amp;font=&amp;colorscheme=light&amp;locale=en_US\" scrolling=\"no\" frameborder=\"0\" allowTransparency=\"true\" style=\"border:none; overflow:hidden; width:300px; height:30px\"><\/iframe><\/div>","protected":false},"excerpt":{"rendered":"<p>I wanted to test drive WSO2 WSF\/PHP on Lighttpd because I couldn&#8217;t find any documentation specific for Lighttpd, or any one complaining that it cannot be done. I set up a new VMWare image running Debian so that I can blog all the steps involved in getting WSO2 WSF\/PHP working on Lighttpd running on Debian. &#8230; <a title=\"WSO2 WSF\/PHP with Lighttpd\" class=\"read-more\" href=\"https:\/\/mohanjith.net\/blog\/2008\/01\/wso2-wsfphp-with-lighttpd.html\" aria-label=\"More on WSO2 WSF\/PHP with Lighttpd\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"enabled":false},"version":2}},"categories":[80,77,74,26,81,79],"tags":[392,389,386,338,393,391],"class_list":["post-26","post","type-post","status-publish","format-standard","hentry","category-debian","category-lighttpd","category-lighty","category-linux","category-wsfphp","category-wso2","tag-debian","tag-lighttpd","tag-lighty","tag-linux","tag-wsfphp","tag-wso2"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5lUHm-q","jetpack_likes_enabled":false,"_links":{"self":[{"href":"https:\/\/mohanjith.net\/blog\/wp-json\/wp\/v2\/posts\/26","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mohanjith.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohanjith.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohanjith.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohanjith.net\/blog\/wp-json\/wp\/v2\/comments?post=26"}],"version-history":[{"count":0,"href":"https:\/\/mohanjith.net\/blog\/wp-json\/wp\/v2\/posts\/26\/revisions"}],"wp:attachment":[{"href":"https:\/\/mohanjith.net\/blog\/wp-json\/wp\/v2\/media?parent=26"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohanjith.net\/blog\/wp-json\/wp\/v2\/categories?post=26"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohanjith.net\/blog\/wp-json\/wp\/v2\/tags?post=26"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}