<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Dimuthu's Blog &#187; install</title>
	<atom:link href="http://www.dimuthu.org/tag/install/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dimuthu.org</link>
	<description>Waiting for your comments</description>
	<lastBuildDate>Wed, 07 Jul 2010 12:42:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
<image>
  <link>http://www.dimuthu.org</link>
  <url>http://www.dimuthu.org/favicon.ico</url>
  <title>Dimuthu's Blog</title>
</image>
		<item>
		<title>Install PHP, WSF/PHP and DataServices in a Shared Hosting Environment</title>
		<link>http://www.dimuthu.org/blog/2008/08/16/install-php-wsfphp-and-dataservices-in-a-shared-hosting-environment/</link>
		<comments>http://www.dimuthu.org/blog/2008/08/16/install-php-wsfphp-and-dataservices-in-a-shared-hosting-environment/#comments</comments>
		<pubDate>Sat, 16 Aug 2008 07:55:00 +0000</pubDate>
		<dc:creator>dimuthu</dc:creator>
				<category><![CDATA[DataServices]]></category>
		<category><![CDATA[Tutorial/Guide]]></category>
		<category><![CDATA[web services]]></category>
		<category><![CDATA[wsf/php]]></category>
		<category><![CDATA[wso2]]></category>
		<category><![CDATA[cgi]]></category>
		<category><![CDATA[data services]]></category>
		<category><![CDATA[DataService]]></category>
		<category><![CDATA[dreamhost]]></category>
		<category><![CDATA[fastcgi]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[lamp]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php.cgi]]></category>
		<category><![CDATA[php.ini]]></category>
		<category><![CDATA[Shared hosting environment]]></category>

		<guid isPermaLink="false">http://www.dimuthu.org/?p=123</guid>
		<description><![CDATA[If you have a shared hosting environment you will find it is not straight forward to install WSO2 WSF/PHP + PHP DataServices Library since you have very limited authority on your environment. Here in this post, I&#8217;m explaining the steps I followed in setting up my custom PHP, WSF/PHP Extension and DataServices library for http://ws.dimuthu.org [...]]]></description>
			<content:encoded><![CDATA[<p>If you have a shared hosting environment you will find it is not straight forward to install <a href="http://wso2.org/projects/wsf/php">WSO2 WSF/PHP</a> + <a href="http://labs.wso2.org/wsf/php/resource_view.php?url=DataServices">PHP DataServices Library</a> since you have very limited authority on your environment. Here in this post, I&#8217;m explaining the steps I followed in setting up my custom PHP, WSF/PHP Extension and DataServices library for <a href="http://ws.dimuthu.org">http://ws.dimuthu.org</a> (This is a shared hosting environment from <a href="http://dreamhost.com">dreamhost</a> based on LAMP stack) which I&#8217;m using to expose my blog as a WebService.</p>
<p><strong>Prerequisites:</strong></p>
<ol>
<li>You should be able to run PHP using mod_fastcgi (not using mod_php) in Apache. That allows you to configure your own php environment.</li>
<li>The server configurations managed by the hosting service should allow you to handle .php extension from your own  CGI executable (here it is php.cgi), If not, you can still try with setting some other extension (say .phq or .qhq, anything not .php) to be handled by your php-cgi. Anyway if your hosting service allow you to run CGI then most probably you have this permission.</li>
<li>You should have the access to the shell (using SSH) and should be able to use development libraries(libxml, libxsl, libopenssl) + build tools (make)</li>
<li>There can be some other restrictions that your hosting service has put on you, that I have not experienced with my hosting service. So please check your hosting service support and documentation for possibility of building your own PHP environment.</li>
</ol>
<p><strong>Install PHP:</strong></p>
<p>I have extracted out most of the steps from <a href="http://wiki.dreamhost.com/Custom_PHP.ini">dreamhost documentation on custom php.ini.</a></p>
<ol>
<li> <a href="http://php.net">Download PHP</a> and compile. You should at least enable &#8211;enable-fastcgi &#8211;enable-force-cgi-redirect in the configuration.
<pre>./configure --enable-fastcgi --enable-force-cgi-redirect --with-xsl --with-openssl --prefix=`pwd`/dist
make
make install</pre>
<p>Note: from here on, php source directory is referred as &lt;php_source_directory&gt;<br />
I have installed the php to &lt;php_source_directory&gt;/dist since we mostly don&#8217;t have permission to install it in to default location. (/usr/local). From here on I will be referring php installation directory as &lt;php_install_dir&gt;</li>
<li>create a directory called &#8216;cgi-bin&#8217; to your web document root directory(&lt;document_root_directory&gt;) and copy the &lt;php_source_directory&gt;/dist/bin/php-cgi in to that. (before php version 5.2.1 there is no php-cgi generated, you can just copy the php to the cgi-bin directory). And rename the php-cgi to php.cgi.
<pre>cp &lt;php_install_direcory&gt;/bin/php-cgi &lt;document_root_directory&gt;/cgi-bin/php.cgi</pre>
</li>
<li>copy &lt;php_source_direcory/php.ini-dist to the cgi-bin directory and rename it as php.ini, this can be used to configure your php environment.
<pre>cp &lt;php_source_directory/php.ini-dist &lt;document_root_directory&gt;/cgi-bin/php.ini</pre>
</li>
<li>Create .htaccess file in the cgi-bin directory to allow the access to php-cgi and php.ini files.
<pre><span style="font-weight: bold; color: #c20cb9;">cat</span> &lt;&lt; EOF &gt;&lt;document_root_directory&gt;/cgi-bin/.htaccess
Options +ExecCGI -Indexes +FollowSymLinks
&lt;FilesMatch <span style="color: #ff0000;">"php(.?)<span style="font-weight: bold; color: #000099;">\\</span>.(cgi|ini)$"</span>&gt;
Order Deny,Allow
Deny from All
Allow from <span style="color: #007800;">env=</span>REDIRECT_STATUS
&lt;/FilesMatch&gt;

EOF</pre>
</li>
<li>Create .htaccess file in the root directory redirect all the requests for .php extensions to go through our php-cgi.
<pre><span style="font-weight: bold; color: #c20cb9;">cat</span> &lt;&lt; EOF &gt; &lt;document_root_directory&gt;/.htaccess
AddHandler php-cgi .php
Action php-cgi /cgi-bin/php.cgi
EOF</pre>
<p>If your hosting service doesn&#8217;t allow to handle .php just rename the end of the first line to some other extension.</li>
<li>Check the necessary permissions levels in files.
<pre>chmod 644 &lt;document_root_directory&gt;/.htaccess
chmod 755 &lt;document_root_directory&gt;/cgi-bin
chmod 644 &lt;document_root_directory&gt;/cgi-bin/.htaccess
chmod 644 &lt;document_root_directory&gt;/cgi-bin/php.ini
chmod 755 &lt;document_root_directory&gt;/cgi-bin/php.cgi</pre>
</li>
</ol>
<p>That&#8217;s it. Now your .php files should be run on your own php environment. Just to check whether it is working or not create a phpinfo() file.</p>
<pre><span style="font-weight: bold; color: #c20cb9;">cat</span> &lt;&lt;EOF &gt; phpinfo.php
&lt;?php
phpinfo<span style="font-weight: bold; color: #7a0874;">(</span><span style="font-weight: bold; color: #7a0874;">)</span>;
?&gt;
EOF</pre>
<p>And go to the http://yourdoman.com/phpinfo.php and verify that it is your custom php environment .</p>
<p><strong>Installing WSF/PHP</strong></p>
<ol>
<li><a href="http://wso2.org/downloads/wsf/php">Download WSF/PHP latest version</a> and extract it to any of your preferred directory(&lt;wsf_php_source_directory&gt;).</li>
<li>Set the PATH environment variable to search for your custom php installation first.</li>
<pre>export PATH=&lt;php_install_dir&gt;/bin:$PATH</pre>
<li>From the same shell go to the &lt;wsf_php_source_directory&gt; and compile it.
<pre>./configure
make
make install</pre>
</li>
<li>Now check where you have installed wsf/php. it is in fact the extension dir shown by the php-config command.
<pre>php-config --extension-dir</pre>
<p>I will refer this directory as &lt;php_extension_directory&gt;</li>
<li>Open the &lt;document_root_directory&gt;/cgi-bin/php.ini an set the extension directory, enable wsf extension and set the include path to the wsf scripts directory.cat &lt;&lt;EOF &gt;&gt; &lt;wsf_php_source_directory&gt;/cgi-bin/php.ini
<pre><span style="font-weight: bold; color: #c20cb9;">cat</span> &lt;&lt;EOF &gt;&gt; &lt;wsf_php_source_directory&gt;/cgi-bin/php.ini
<span style="color: #007800;">extension_dir=</span>&lt;php_extension_directory&gt;
<span style="color: #007800;">extension=</span>wsf.so
<span style="color: #007800;">include_path=</span><span style="color: #ff0000;">".:&lt;wsf_php_source_directory&gt;/scripts"</span>

EOF</pre>
<p>If you found that you can only put relative directories in your php.ini (that happens when you don&#8217;t even have the read access to your root directory &#8216;/&#8217;), follow the workaround mentioned in here, <a href="http://phpwebservices.blogspot.com/2008/08/installing-wsfphp-in-third-party.html">http://phpwebservices.blogspot.com/2008/08/installing-wsfphp-in-third-party.html</a></li>
</ol>
<p>That&#8217;s all. Just check the phpinfo (created earlier section) whether your configurations and the wsf extension are loaded correctly. In order to test the functionality copy the wsf/php samples to the web document root and access them from the browser. Go to each sample and verify they function as expected.</p>
<pre>cp /samples &lt;wsf_php_source_directory&gt;/ -R</pre>
<p>And go to http://yourdomain.com/samples and click on each samples. If this not working most probably your localhost to ip mapping is wrong, most probably this problem is there in your shared host. Just go to the samples directory and change the endpoint to the domain name in place of &#8216;localhost&#8217; in each client and try it again.</p>
<p><strong>Installing PHP DataServices</strong>:</p>
<ol>
<li><a href="http://labs.wso2.org/wsf/php/resource_view.php?url=DataServices">Download and unpack PHP DataServices</a>. &lt;php_data_services_directory&gt;</li>
<li>Update the include_path entry in php.ini to DataServices libraries directory as well. So the &lt;wsf_php_source_directory&gt;/cgi-bin/php.ini  file now has the following entry.
<pre>include_path=".:&lt;wsf_php_source_directory&gt;/scripts:&lt;php_data_services_directory&gt;/lib"</pre>
</li>
</ol>
<p>That&#8217; all for the DataService installation. Please read &lt;php_data_services_directory&gt;/README to run the samples. Anyway if you are sure you did followed these simple steps correctly, go on with your DataService  development. Specially if you have wordpress database, you may start straight away with<a href="http://www.dimuthu.org/blog/2008/08/11/make-your-wordpress-blog-a-web-service-in-few-step/"> the making wordpress a DataService</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dimuthu.org/blog/2008/08/16/install-php-wsfphp-and-dataservices-in-a-shared-hosting-environment/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>FAQ for WSF/PHP Installation</title>
		<link>http://www.dimuthu.org/blog/2008/07/24/faq-for-wsfphp-installation/</link>
		<comments>http://www.dimuthu.org/blog/2008/07/24/faq-for-wsfphp-installation/#comments</comments>
		<pubDate>Thu, 24 Jul 2008 19:58:20 +0000</pubDate>
		<dc:creator>dimuthu</dc:creator>
				<category><![CDATA[wsf/php]]></category>
		<category><![CDATA[faq]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wsf]]></category>
		<category><![CDATA[wso2]]></category>

		<guid isPermaLink="false">http://www.dimuthu.org/?p=40</guid>
		<description><![CDATA[Answering users questions about wsf/php installation for many months, I thought it is worth to take some time and make a shortlist of some regular questions asked by them. Actually problems has been occurred not only due to users mistakes in following the installation steps properly, but also due to the status of the systems [...]]]></description>
			<content:encoded><![CDATA[<p>Answering users questions about wsf/php installation for many months, I thought it is worth to take some time and make a shortlist of some regular questions asked by them. Actually problems has been occurred not only due to users mistakes in following the installation steps properly, but also due to the status of the systems like already installed old versions, use of different package management tools, mulitple installations of same thing like php/apache and conflicts in libraries. In this little FAQ i&#8217;m trying to answer problems users come up with due to all of above mentioned reasons. And feel free to correct me or even add here some entries through comments.</p>
<ol>
<li><strong>Where is the installation guide?</strong>If you have downloaded the packs (either source or binaries), you can find the installation README in their. README.INSTALL for the linux installation and README.INSTALL_WIN32 for the windows installation.
<p>You can find the online version from <a title="Online installation guide" href="http://wso2.org/project/wsf/php/1.3.2/docs/install_guide.html ">http://wso2.org/project/wsf/php/1.3.2/docs/install_guide.html </a></li>
<li><strong>I have lot of php.ini files in my system. Which should I edit? (Refers to <a href="http://wso2.org/forum/thread/3879">http://wso2.org/forum/thread/3879</a>)</strong>This is because you have many PHP installations in your system, one from deb, one from compiling source another can be from Zend core. Similarly there can be many apache instances as well.
<p>The best way to find the php.ini is to use the php function phpinfo(). For that you have to find the apache web root directory. By default it is &#8216;/var/www&#8217;. If it is not /var/www just find for the directory named htdocs and it can be most probably your web root directory.</p>
<p>Create a php file (say phpinfo.php) with the following lines of code.</p>
<pre><span style="font-weight: bold; color: #000000;">&lt;?php</span>
<a href="http://www.php.net/phpinfo"><span style="color: #000066;">phpinfo</span></a><span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span>
<span style="font-weight: bold; color: #000000;">?&gt;</span></pre>
<p>And save the file inside your root web directory and access it though the browser. (most probably it is http://localhost/phpinfo.php)</p>
<p>And search for the entry &#8220;Loaded Configuration File&#8221;. That is exactly what you were finding for..</li>
<li><strong>My Web Services Client correctly working on the Command line (using PHP CLI). But the same thing doesn&#8217;t work when I put it in the apache server in the same computer and access from a browser. It complains with the error message &#8216;WSClient&#8217; not found, What can be the problem?</strong>The php.ini loaded by the CLI can be different from the one loaded by the server. Just find the correct php.ini loaded by the server. So the answer to this question is same as the answer to the above question.</li>
<li><strong>My Web Service Client run on the apache server correctly, but doesn&#8217;t run on the command line?</strong><br />
There also you need to find the php.ini loaded from the PHP CLI. run the php -i command and check what is the loaded configuration.</li>
<li><strong>I&#8217;m in windows. I have followed all the steps correctly. But php error log always says wsf.dll is not loaded. What may I have missed here?</strong><br />
The first thing you should do is check the PATH variable value from a phpinfo (not from command line), I have mentioned the steps to create phpinfo page in the answer to the question number 2. After that search the entry for PATH variable in the Apache environment section. Just check whether this is the same path that you think you have set. You get this problem mostly because the path loaded by apache is different from what you set. You may mistakenly have set the required library paths to the user environment variable and not to the system environment variable. Or you may have to restart the system to actually update these variable. Try these things until you actually get the PATH you want to have from the phpinfo.</p>
<p>The other possibility is you have a set of old libraries prior to the new libraries in your PATH. This happens mostly if you are upgrading the system from old wsf/php version. If that so make sure you remove the paths of these old libraries from the PATH variable.</p>
<p>And another possibility is the user mistake. Check your libxml, iconv and openssl libraries are actually in the PATH, if not just set it and try.</li>
<li><strong>All my samples are working except the samples in the wsdl_mode and wsdl_generation directories. Any clue?</strong><br />
You may have missed either<br />
installing, enable php xsl extension<br />
or<br />
setting the include_path to the scripts directory. (This scripts directory is shipped with every binary and source packs, when you extract these packs the &#8216;scripts&#8217; directory will be there right in the root directory of the pack.</p>
<p>The other very rare reason would be some compatibility issues on libxml2 version used by dom  and the libxml2 version used by the xsl. Apparently if you have libxml2 version 2.6.31 with an older libxml2 version (like 2.6.2*) most probably you will find php crashes when using xsl and dom. See the link <a href="http://wso2.markmail.org/message/54yvh2pcowhrj332">http://wso2.markmail.org/message/54yvh2pcowhrj332</a>. This is like fight between dom and xsl for the libxml2 library, if the first one loaded the old version the other one will be down, since it is not compatible with that loaded version. in this situation you have to upgrade either the xsl extension or the dom extension (that mean you better upgrade all the php libraries and binaries)</li>
<li><strong>I installed apache and php using apt-get command in my ubuntu OS. but when I edit php.ini in the /etc/php5/apache2 directory the configuration are not loaded correctly. What should I do?</strong><br />
This problem can be aroused in any debian based system when you install apache and php from apt-get or with deb. In this case you have to create a file like wsf.ini inside /etc/php5/apache2/conf.d directory and add the wsf specific configuration there.<br />
extension=wsf.so<br />
include_path=.:/my/script/directory/script<br />
Remember there you have to install php-xsl package from apt-get or using a deb.</li>
<li><strong>When I run samples It simply doesn&#8217;t work. And there are no complains in the php error log or apache error log, and in phpinfo it shows the wsf is correctly loaded. How can I solve this?</strong><br />
If the wsf is loaded and still the samples fails, the next thing you should do is check out the wsf logs from where you specify to generate in the php.ini (if you didn&#8217;t specify it in linux it will be default to /tmp directory). Open the wsf_php_client.log and find the errors and entries in the later part that may have caused the problem. If it say something like client repo doesn&#8217;t exists or axis2.xml is failed to load just double check the wsf.home you specified in the php.ini<br />
If you don&#8217;t understand whatever the wsf log tell, please put a question in the forum http://wso2.org/forum/188 or put a mail <a href="http://wso2.org/mail#WSFPHP">http://wso2.org/mail#WSFPHP</a> with both wsf_php_client.log and wsf_php_service.log attached. (Make sure you delete any sensitive data in the blog)</li>
<li><strong>Samples says it is working successfully. How can I make sure the clients/services actually sends messages?</strong><br />
Download tcpmon from <a title="tcpmon download link" href="http://ws.apache.org/commons/tcpmon/download.cgi">http://ws.apache.org/commons/tcpmon/download.cgi</a>. You can send the messages through tcpmon and track their content. Just read the <a title="tcpmon tutorial" href="http://ws.apache.org/commons/tcpmon/tcpmontutorial.html">tcpmon tutorial</a> and try to get it working.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.dimuthu.org/blog/2008/07/24/faq-for-wsfphp-installation/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Installing wsf/perl in Ubuntu</title>
		<link>http://www.dimuthu.org/blog/2008/07/19/installing-wsfperl-in-ubuntu/</link>
		<comments>http://www.dimuthu.org/blog/2008/07/19/installing-wsfperl-in-ubuntu/#comments</comments>
		<pubDate>Sat, 19 Jul 2008 15:18:51 +0000</pubDate>
		<dc:creator>dimuthu</dc:creator>
				<category><![CDATA[web services]]></category>
		<category><![CDATA[wsf/perl]]></category>
		<category><![CDATA[wso2]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[wsf]]></category>

		<guid isPermaLink="false">http://www.dimuthu.org/?p=6</guid>
		<description><![CDATA[Today I got to install wso2 wsf/perl in my Ubuntu 8.04 OS. It was really straight forward.  Just follow the following steps and you are ready to do real web services in perl. Download wsf/perl 1.1 from cpan web site. http://search.cpan.org/CPAN/authors/id/C/CH/CHINTANA/WSO2-WSF-Perl-1.1.tar.gz Download wsf/c 1.3.0 from the oxygen tank. http://dist.wso2.org/products/wsf/c/1.3.0/wso2-wsf-c-src-1.3.0.tar.gz First extract the wsf/c packtar xvzf [...]]]></description>
			<content:encoded><![CDATA[<p>Today I got to install wso2 wsf/perl in my Ubuntu 8.04 OS. It was really straight forward.  Just follow the following steps and you are ready to do real web services in perl.</p>
<ol>
<li> Download wsf/perl 1.1 from cpan web site. <a title="Cpan WSF/Perl download site" href="http://search.cpan.org/CPAN/authors/id/C/CH/CHINTANA/WSO2-WSF-Perl-1.1.tar.gz">http://search.cpan.org/CPAN/authors/id/C/CH/CHINTANA/WSO2-WSF-Perl-1.1.tar.gz</a></li>
<li> Download wsf/c 1.3.0 from the oxygen tank. <a title="wsf/c download site" href="http://dist.wso2.org/products/wsf/c/1.3.0/wso2-wsf-c-src-1.3.0.tar.gz">http://dist.wso2.org/products/wsf/c/1.3.0/wso2-wsf-c-src-1.3.0.tar.gz</a></li>
<li> First extract the wsf/c pack<em>tar xvzf <a title="wsf/c download site" href="http://dist.wso2.org/products/wsf/c/1.3.0/wso2-wsf-c-src-1.3.0.tar.gz">wso2-wsf-c-src-1.3.0.tar.gz</a></em></li>
<li> Compile and install the wsf/c to a preferred directory (say /tmp/wsfc).<em>./configure &#8211;prefix=&#8217;/tmp/wsfc&#8217;</em><em>make</em><em>make install </em>(you may need super user privileges depending on where you select to install the package)</li>
<li> Install the following packages from apt respositories.perl, libperl-dev, liberror-perlYou can use the following command to install them<em>sudo apt-get install perl</em><em>sudo apt-get install libperl-dev</em>
<p><em>sudo apt-get install liberror-perl</em></li>
<li> Now extract the WSO2-WSF-Perl-1.1.tar.gz<em>tar xvzf WSO2-WSF-Perl-1.1.tar.gz</em></li>
<li> Set the WSFC_HOME environment variable to where you install wsf/c. (in our example it is /tmp/wsfc)export WSFC_HOME=/tmp/wsfc (Remember you have to do this every time you open a new shell, or else put this line in the ~/.bashrc file)</li>
<li> Inside the WSO2-WSF-Perl-1.1 directory run<em>perl Makefile.PL</em>Note: This may sometime complains about missiling libraries (actually for -laxis2_minizip, -laxis2_libxml2, -lhtpwcb). Anyway this will not be a problem for your installation.</li>
<li> Now the last step of your installation.<em>make</em><em>sudo make install </em>(Here you need to have super user priviledges)</li>
<li> Just go to the samples directory and run the echo_client.pl (You need to have a wsf/php server running to response these wsf/perl calls). Make sure it gives the expexted output.</li>
</ol>
<p>Currently WSF/Perl have only the web services client libraries. But it is rich with features like WS-Security, WS-Reliable Messaging, MTOM and many more.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dimuthu.org/blog/2008/07/19/installing-wsfperl-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
