<?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>BioGem.Org &#187; Information Technology</title>
	<atom:link href="http://www.biogem.org/category/information-technology/feed" rel="self" type="application/rss+xml" />
	<link>http://www.biogem.org</link>
	<description>Bioinformatics Blog Site..</description>
	<lastBuildDate>Sat, 03 Jul 2010 07:57:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Embedding Perl into Perl</title>
		<link>http://www.biogem.org/2010/06/embedding-perl-into-perl.html</link>
		<comments>http://www.biogem.org/2010/06/embedding-perl-into-perl.html#comments</comments>
		<pubDate>Sun, 06 Jun 2010 17:39:24 +0000</pubDate>
		<dc:creator>Ashok Kumar</dc:creator>
				<category><![CDATA[Information Technology]]></category>
		<category><![CDATA[Common Gateway Interface]]></category>
		<category><![CDATA[Embedding]]></category>

		<guid isPermaLink="false">http://www.biogem.org/?p=289</guid>
		<description><![CDATA[This article describes embedding a Perl script into a Perl script. This program is an Common Gateway Interface, which reads ASCII files through file upload and displays content of the file. The Perl script upload.pl is called through the Perl script file-upload.pl using function eval{ }. This program can be modified to call by reference [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><span style="font-size: small;">This article describes embedding a Perl script into a Perl script. This program is an Common Gateway Interface, which reads ASCII files through file upload and displays content of the file. The Perl script <em>upload.pl</em> is called through the Perl script <em>file-upload.pl</em> using function eval{ }. This program can be modified to call by reference function, to access in other programs too.</span></p>
<p><span style="font-size: small;"><strong><span id="more-289"></span>file-upload.html</strong></span><span style="font-size: small;"><br />
<span style="font-family: courier new,courier;">&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;File Upload&lt;/title&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;form method=&#8221;post&#8221; action=&#8221;/cgi-bin/file-upload.pl&#8221; enctype=&#8221;multipart/form-data&#8221;&gt;<br />
Enter the file to upload:&lt;br&gt;<br />
&lt;input name=&#8221;file&#8221; size=&#8221;45&#8243; type=&#8221;file&#8221;&gt;&lt;br&gt;<br />
&lt;p&gt;<br />
&lt;input name=&#8221;reset&#8221; type=&#8221;reset&#8221;&gt;<br />
&lt;input name=&#8221;submit&#8221; value=&#8221;Upload&#8221; type=&#8221;submit&#8221;&gt;<br />
&lt;/p&gt;<br />
&lt;/form&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;<br />
</span></span></p>
<p><span style="font-size: small;"><strong>file-upload.pl</strong><br />
<span style="font-family: courier new,courier;">#!/usr/bin/perl<br />
eval { require &#8220;upload.pl&#8221; };<br />
my @x = upload();<br />
print &#8220;Content-type: text/html\n\n&#8221;;<br />
print &#8220;&lt;font face=&#8217;courier new&#8217;&gt;&#8221;,@x,&#8221;&lt;/font&gt;&#8221;;</span></span></p>
<p><span style="font-size: small;"><strong>upload.pl</strong><br />
<span style="font-family: courier new,courier;">#!/usr/bin/perl<br />
use strict &#8216;refs&#8217;;<br />
use lib &#8216;..&#8217;;<br />
use CGI qw(:standard);<br />
use CGI::Carp qw(fatalsToBrowser);<br />
sub upload()<br />
{<br />
my $file = param(&#8217;file&#8217;);<br />
while (&lt;param(&#8217;file&#8217;)&gt;)<br />
{<br />
@_ = &lt;$file&gt;;<br />
}<br />
return (@_);<br />
}</span></span></p>
<p><span style="font-size: small;"><span style="font-family: courier new,courier;"><strong><span style="font-family: georgia,palatino;">Note: </span></strong><span style="font-family: georgia,palatino;">Both Perl scripts must granted file permission (<span style="font-family: verdana,geneva;">0755</span>)</span><br />
</span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.biogem.org/2010/06/embedding-perl-into-perl.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Running JAVA program in Linux Ubuntu</title>
		<link>http://www.biogem.org/2009/12/running-java-program-in-linux-ubuntu.html</link>
		<comments>http://www.biogem.org/2009/12/running-java-program-in-linux-ubuntu.html#comments</comments>
		<pubDate>Wed, 16 Dec 2009 15:49:39 +0000</pubDate>
		<dc:creator>Ashok Kumar</dc:creator>
				<category><![CDATA[Information Technology]]></category>
		<category><![CDATA[JAVA]]></category>
		<category><![CDATA[jre6]]></category>

		<guid isPermaLink="false">http://www.biogem.org/?p=181</guid>
		<description><![CDATA[Steps to run JAVA program in Ubuntu:
1. Go to Applications &#62; Accessories &#62; Terminal, to open terminal window.
2. Type the following in command line
gedit Add.java
3. Enter the code bellow in the editor.
/* Addition of two numbers &#8211; Add.java */
import java.io.*;
class Add
{
public static void main(String args[])
{
InputStreamReader ISR = new InputStreamReader(System.in);
BufferedReader BR = new BufferedReader(ISR);
int a = [...]]]></description>
			<content:encoded><![CDATA[<p><span style="font-size: medium;"><span style="font-family: georgia,palatino;"><span style="color: #ff0000;"><strong>Steps to run JAVA program in Ubuntu:</strong></span></span></span></p>
<p><span style="font-family: georgia,palatino;"><span style="font-size: small;">1. Go to <em>Applications</em> &gt; <em>Accessories</em> &gt;<em> Terminal</em>, to open terminal window.</span></span></p>
<p><span style="font-family: georgia,palatino;"><span style="font-size: small;">2. Type the following in command line</span></span></p>
<p><span style="font-family: georgia,palatino;"><span style="font-size: small;"><em><span style="color: #0000ff;">gedit Add.java<span id="more-181"></span></span></em></span></span></p>
<p><span style="font-family: georgia,palatino;"><span style="font-size: small;">3. Enter the code bellow in the editor.</span></span></p>
<p><span style="font-family: georgia,palatino;"><span style="font-size: small;"><em><span style="color: #0000ff;">/* Addition of two numbers &#8211; Add.java */<br />
import java.io.*;<br />
class Add<br />
{<br />
public static void main(String args[])<br />
{<br />
InputStreamReader ISR = new InputStreamReader(System.in);<br />
BufferedReader BR = new BufferedReader(ISR);<br />
int a = 0, b = 0;<br />
try<br />
{<br />
System.out.print(&#8221;Enter the first number: &#8220;);<br />
a = Integer.parseInt(BR.readLine());<br />
System.out.print(&#8221;Enter the second number: &#8220;);<br />
b = Integer.parseInt(BR.readLine());<br />
}<br />
catch(Exception e)<br />
{<br />
System.out.println(&#8221;Check the program.&#8221;);<br />
}<br />
System.out.println(&#8221;Addition of &#8221; + a + &#8221; + &#8221; + b + &#8221; is&#8221; + (a+b));<br />
}<br />
}</span></em></span></span></p>
<p><span style="font-family: georgia,palatino;"><span style="font-size: small;">4. Save the file and close to return to terminal window.</span></span></p>
<p><span style="font-family: georgia,palatino;"><span style="font-size: small;">5. Firstly compile the code using the following command</span></span></p>
<p><span style="font-family: georgia,palatino;"><span style="font-size: small;"><em><span style="color: #0000ff;">javac Add.java</span></em></span></span></p>
<p><span style="font-family: georgia,palatino;"><span style="font-size: small;">That would produce an class file you may need to run the program.</span></span></p>
<p><span style="font-family: georgia,palatino;"><span style="font-size: small;">7. Now run this executable using the following command</span></span></p>
<p><span style="font-family: georgia,palatino;"><span style="font-size: small;"><em><span style="color: #0000ff;">java Add</span></em></span></span></p>
<p><span style="font-family: georgia,palatino;"><span style="font-size: small;">8. Output should show as follows</span></span></p>
<p><span style="font-family: georgia,palatino;"><span style="font-size: small;"><em><span style="color: #ff0000;">Enter the first number: 49<br />
Enter the second number: 2<br />
Addition of 49 + 2 is 51</span></em></span></span></p>
<p><span style="font-family: georgia,palatino;"><span style="font-size: small;"><strong>Note: </strong>If java is not present in the system, download it through terminal window using command <em><span style="color: #0000ff;">sudo apt-get install sun-java6-bin sun-java6-jre sun-java6-jdk</span></em></span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.biogem.org/2009/12/running-java-program-in-linux-ubuntu.html/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Installing and Configuring XAMPP in Windows 7</title>
		<link>http://www.biogem.org/2009/12/installing-and-configuring-xampp-in-windows-7.html</link>
		<comments>http://www.biogem.org/2009/12/installing-and-configuring-xampp-in-windows-7.html#comments</comments>
		<pubDate>Mon, 14 Dec 2009 16:29:30 +0000</pubDate>
		<dc:creator>Ashok Kumar</dc:creator>
				<category><![CDATA[Information Technology]]></category>
		<category><![CDATA[WebServer]]></category>
		<category><![CDATA[Windows 7]]></category>
		<category><![CDATA[XAMPP]]></category>

		<guid isPermaLink="false">http://www.biogem.org/?p=148</guid>
		<description><![CDATA[Many people know from their own experience that it&#8217;s not easy to install an Apache web server and it gets harder if you want to add MySQL, PHP and Perl.
XAMPP is an easy to install Apache distribution containing MySQL, PHP and Perl. XAMPP is really very easy to install and to use &#8211; just download, [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Many people know from their own experience that it&#8217;s not easy to install an Apache web server and it gets harder if you want to add MySQL, PHP and Perl.</p>
<p style="text-align: justify;">XAMPP is an easy to install Apache distribution containing MySQL, PHP and Perl. XAMPP is really very easy to install and to use &#8211; just download, extract and start.</p>
<p style="text-align: justify;">At the moment there are four XAMPP distributions:</p>
<p><span id="more-148"></span><br />
<a name="295"></a></p>
<h4><a href="http://www.apachefriends.org/en/xampp-linux.html"><img src="http://www.apachefriends.org/img/afbullet.gif" border="0" alt="*" /> XAMPP for Linux <img src="http://www.apachefriends.org/img/link.gif" border="0" alt="" /></a></h4>
<p style="text-align: justify;">The distribution for Linux systems (tested for SuSE, RedHat, Mandrake and Debian) contains: Apache, MySQL, PHP &amp; PEAR, Perl, ProFTPD, phpMyAdmin, OpenSSL, GD, Freetype2, libjpeg, libpng, gdbm, zlib, expat, Sablotron, libxml, Ming, Webalizer, pdf class, ncurses, mod_perl, FreeTDS, gettext, mcrypt, mhash, eAccelerator, SQLite and IMAP C-Client. <a name="296"></a></p>
<h4 style="text-align: justify;"><a href="http://www.apachefriends.org/en/xampp-windows.html"><img src="http://www.apachefriends.org/img/afbullet.gif" border="0" alt="*" /> XAMPP for Windows <img src="http://www.apachefriends.org/img/link.gif" border="0" alt="" /></a></h4>
<p style="text-align: justify;">The distribution for Windows 2000, 2003, XP and Vista. This version contains: Apache, MySQL, PHP + PEAR, Perl, mod_php, mod_perl, mod_ssl, OpenSSL, phpMyAdmin, Webalizer, Mercury Mail Transport System for Win32 and NetWare Systems v3.32, Ming, JpGraph, FileZilla FTP Server, mcrypt, eAccelerator, SQLite, and WEB-DAV + mod_auth_mysql. <a name="885"></a></p>
<h4 style="text-align: justify;"><a href="http://www.apachefriends.org/en/xampp-macosx.html"><img src="http://www.apachefriends.org/img/afbullet.gif" border="0" alt="*" /> XAMPP for Mac OS X <img src="http://www.apachefriends.org/img/link.gif" border="0" alt="" /></a></h4>
<p style="text-align: justify;">The distribution for Mac OS X contains: Apache, MySQL, PHP &amp; PEAR, SQLite, Perl, ProFTPD, phpMyAdmin, OpenSSL, GD, Freetype2, libjpeg, libpng, zlib, Ming, Webalizer, mod_perl. <a name="297"></a></p>
<h4><a href="http://www.apachefriends.org/en/xampp-solaris.html"><img src="http://www.apachefriends.org/img/afbullet.gif" border="0" alt="*" /> XAMPP for Solaris <img src="http://www.apachefriends.org/img/link.gif" border="0" alt="" /></a></h4>
<p style="text-align: justify;">The distribution for Solaris (developed and tested with Solaris 8, tested with Solaris 9) contains: Apache, MySQL, PHP &amp; PEAR, Perl, ProFTPD, phpMyAdmin, OpenSSL, Freetype2, libjpeg, libpng, zlib, expat, Ming, Webalizer, pdf class.   WARNING: This version of XAMPP is still in the first steps of development. Use at you own risk!</p>
<h2>Easy installation and deinstallation</h2>
<p style="text-align: justify;">To install XAMPP you only need to download and extract XAMPP, that&#8217;s all. There are no changes to the Windows registry (not true if you use the Windows installer version of XAMPP) and it&#8217;s not necessary to edit any configuration files. It couldn&#8217;t be easier!To check that XAMPP is working some sample programs are included, there is a small CD collection program (written in PHP using MySQL) and a small guest book software (written in Perl) and several other demonstration utilities.</p>
<p style="text-align: justify;">If you decide that XAMPP isn&#8217;t needed any more just delete the XAMPP directory and it&#8217;s completely removed from your system.</p>
<p style="text-align: justify;">However if you use the Windows installer version of XAMPP it&#8217;s recommended to use the uninstall feature. As every installer the installer will make registry entries to remember the install.</p>
<h3><span style="color: #ff0000;">Steps to install:</span></h3>
<h4><span style="color: #008000;">Step 1:</span></h4>
<p><span style="color: #008000;"><a href="http://www.biogem.org/wp-content/uploads/2009/12/1.jpg"><img class="aligncenter size-medium wp-image-156" src="http://www.biogem.org/wp-content/uploads/2009/12/1-300x224.jpg" alt="" width="300" height="224" /></a><br />
</span></p>
<h4><span style="color: #008000;">Step 2:</span></h4>
<p style="text-align: center;"><span style="color: #008000;"><a href="http://www.biogem.org/wp-content/uploads/2009/12/3.jpg"><img class="aligncenter size-medium wp-image-158" src="http://www.biogem.org/wp-content/uploads/2009/12/31-300x224.jpg" alt="" width="300" height="224" /></a><br />
</span></p>
<h4><span style="color: #008000;">Step 3:</span></h4>
<p><span style="color: #008000;"><a href="http://www.biogem.org/wp-content/uploads/2009/12/4.jpg"><img class="aligncenter size-medium wp-image-159" src="http://www.biogem.org/wp-content/uploads/2009/12/4-300x151.jpg" alt="" width="300" height="151" /></a><br />
</span></p>
<h4><span style="color: #008000;">Step 4:</span></h4>
<p><span style="color: #008000;"><a href="http://www.biogem.org/wp-content/uploads/2009/12/5.jpg"><img class="aligncenter size-medium wp-image-160" title="XAMPP" src="http://www.biogem.org/wp-content/uploads/2009/12/5-300x151.jpg" alt="XAMPP" width="300" height="151" /></a><br />
</span></p>
<h4><span style="color: #008000;">Step 5:</span></h4>
<p><span style="color: #008000;"><a href="http://www.biogem.org/wp-content/uploads/2009/12/6.jpg"><img class="aligncenter size-medium wp-image-161" title="XAMPP" src="http://www.biogem.org/wp-content/uploads/2009/12/6-300x151.jpg" alt="XAMPP" width="300" height="151" /></a><br />
</span></p>
<h4><span style="color: #008000;">Step 6:</span></h4>
<p><span style="color: #008000;"><a href="http://www.biogem.org/wp-content/uploads/2009/12/7.jpg"><img class="aligncenter size-medium wp-image-162" title="XAMPP" src="http://www.biogem.org/wp-content/uploads/2009/12/7-300x220.jpg" alt="XAMPP" width="300" height="220" /></a><br />
</span></p>
<h4><span style="color: #008000;">Step 7:</span></h4>
<p><span style="color: #008000;"><a href="http://www.biogem.org/wp-content/uploads/2009/12/8.jpg"><img class="aligncenter size-medium wp-image-163" title="XAMPP" src="http://www.biogem.org/wp-content/uploads/2009/12/8-300x172.jpg" alt="XAMPP" width="300" height="172" /></a><br />
</span></p>
<h4><span style="color: #008000;">Step 8:</span></h4>
<p><span style="color: #008000;"><a href="http://www.biogem.org/wp-content/uploads/2009/12/9.jpg"><img class="aligncenter size-medium wp-image-164" title="XAMPP" src="http://www.biogem.org/wp-content/uploads/2009/12/9-300x172.jpg" alt="XAMPP" width="300" height="172" /></a><br />
</span></p>
<h4><span style="color: #008000;">Step 9:</span></h4>
<p><span style="color: #008000;"><a href="http://www.biogem.org/wp-content/uploads/2009/12/10.jpg"><img class="aligncenter size-medium wp-image-165" title="XAMPP" src="http://www.biogem.org/wp-content/uploads/2009/12/10-300x255.jpg" alt="XAMPP" width="300" height="255" /></a><br />
</span></p>
<h4><span style="color: #008000;">Step 10:</span></h4>
<p><span style="color: #008000;"><a href="http://www.biogem.org/wp-content/uploads/2009/12/11.jpg"><img class="aligncenter size-medium wp-image-166" title="XAMPP" src="http://www.biogem.org/wp-content/uploads/2009/12/11-300x255.jpg" alt="XAMPP" width="300" height="255" /></a><br />
</span></p>
<h4><span style="color: #008000;">Step 11:</span></h4>
<p><span style="color: #008000;"><a href="http://www.biogem.org/wp-content/uploads/2009/12/12.jpg"><img class="aligncenter size-medium wp-image-167" title="XAMPP" src="http://www.biogem.org/wp-content/uploads/2009/12/12-300x255.jpg" alt="XAMPP" width="300" height="255" /></a><br />
</span></p>
<h4><span style="color: #008000;">Step 12:</span></h4>
<p><span style="color: #008000;"><a href="http://www.biogem.org/wp-content/uploads/2009/12/13.jpg"><img class="aligncenter size-medium wp-image-168" title="XAMPP" src="http://www.biogem.org/wp-content/uploads/2009/12/13-300x216.jpg" alt="XAMPP" width="300" height="216" /></a><br />
</span></p>
<h4><span style="color: #008000;">Step 13:</span></h4>
<p><span style="color: #008000;"><a href="http://www.biogem.org/wp-content/uploads/2009/12/14.jpg"><img class="aligncenter size-medium wp-image-169" title="XAMPP" src="http://www.biogem.org/wp-content/uploads/2009/12/14-300x216.jpg" alt="XAMPP" width="300" height="216" /></a><br />
</span></p>
<h4><span style="color: #008000;">Step 14:</span></h4>
<p><span style="color: #008000;"><a href="http://www.biogem.org/wp-content/uploads/2009/12/15.jpg"><img class="aligncenter size-medium wp-image-170" title="XAMPP" src="http://www.biogem.org/wp-content/uploads/2009/12/15-300x83.jpg" alt="XAMPP" width="300" height="83" /></a></span></p>
<p style="text-align: justify;"><span style="color: #008000;">After changing to new password, open <span style="color: #0000ff;">C:\xampp\phpMyAdmin\config.inc.php</span> in a text editor. Go to<span style="color: #ff0000;"><span style="background-color: #ffffff;"> line 21</span> </span>[</span>$cfg['Servers'][$i]['password'] = &#8221;;<span style="color: #008000;">] and change it to new password</span><span style="color: #008000;"> [</span>$cfg['Servers'][$i]['password'] = &#8216;new_password&#8217;;<span style="color: #008000;">]</span><span style="color: #008000;">.</span></p>
<p><span style="color: #008000;"><br />
</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.biogem.org/2009/12/installing-and-configuring-xampp-in-windows-7.html/feed</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>Two methods to run PHP script</title>
		<link>http://www.biogem.org/2009/12/two-methods-to-run-php-script.html</link>
		<comments>http://www.biogem.org/2009/12/two-methods-to-run-php-script.html#comments</comments>
		<pubDate>Tue, 08 Dec 2009 16:54:53 +0000</pubDate>
		<dc:creator>Ashok Kumar</dc:creator>
				<category><![CDATA[Information Technology]]></category>
		<category><![CDATA[Addition]]></category>

		<guid isPermaLink="false">http://www.biogem.org/?p=140</guid>
		<description><![CDATA[HTML with PHP :-
HTML: add.htm
&#60;html&#62;
&#60;head&#62;
&#60;title&#62;Adding two numbers&#60;/title&#62;
&#60;/head&#62;
&#60;body&#62;
&#60;form action=&#8221;add.php&#8221; method=&#8221;post&#8221;&#62;
Enter the first number: &#60;input type=&#8221;text&#8221; name=&#8221;a&#8221; size=10&#62;&#60;br&#62;
Enter the second number: &#60;input type=&#8221;text&#8221; name=&#8221;b&#8221; size=10&#62;&#60;br&#62;
&#60;input type=&#8221;submit&#8221; name=&#8221;submit&#8221; value=&#8221;ADD&#8221;&#62;
&#60;/form&#62;
&#60;/body&#62;
&#60;/html&#62;
PHP: add.php
&#60;html&#62;
&#60;head&#62;
&#60;title&#62;Adding two numbers&#60;/title&#62;
&#60;/head&#62;
&#60;body&#62;
&#60;?php
$a=$_POST["a"];
$b=$_POST["b"];
$c=$a+$b;
print &#8220;Addition of $a and $b is $c.&#8221;;
?&#62;
&#60;/body&#62;
&#60;/html&#62;
Only with PHP :-
&#60;?php
$a = $_POST["a"];
$b = $_POST["b"];
if (!isset($_POST['add']))
{  // If page is not submitted to itself echo the form
?&#62;
&#60;html&#62;
&#60;head&#62;&#60;title&#62;Adding [...]]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">HTML with PHP :-</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">HTML: add.htm</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;html&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;head&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;title&gt;Adding two numbers&lt;/title&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;/head&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;body&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;form action=&#8221;add.php&#8221; method=&#8221;post&#8221;&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">Enter the first number: &lt;input type=&#8221;text&#8221; name=&#8221;a&#8221; size=10&gt;&lt;br&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">Enter the second number: &lt;input type=&#8221;text&#8221; name=&#8221;b&#8221; size=10&gt;&lt;br&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;input type=&#8221;submit&#8221; name=&#8221;submit&#8221; value=&#8221;ADD&#8221;&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;/form&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;/body&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;/html&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">PHP: add.php</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;html&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;head&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;title&gt;Adding two numbers&lt;/title&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;/head&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;body&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;?php</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">$a=$_POST["a"];</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">$b=$_POST["b"];</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">$c=$a+$b;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">print &#8220;Addition of $a and $b is $c.&#8221;;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">?&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;/body&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;/html&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">Only with PHP :-</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;?php</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">$a = $_POST["a"];</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">$b = $_POST["b"];</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">if (!isset($_POST['add']))</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">{  // If page is not submitted to itself echo the form</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">?&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;html&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;head&gt;&lt;title&gt;Adding Two Numbers&lt;/title&gt;&lt;/head&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;body&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;form method=&#8221;post&#8221; action=&#8221;&lt;?php echo $PHP_SELF; ?&gt;&#8221;&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">Enter the first number: &lt;input type=&#8221;text&#8221; size=&#8221;12&#8243; maxlength=&#8221;12&#8243; name=&#8221;a&#8221;&gt;&lt;/br&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">Enter the second number: &lt;input type=&#8221;text&#8221; size=&#8221;12&#8243; maxlength=&#8221;36&#8243; name=&#8221;b&#8221;&gt;&lt;/br&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;input type=&#8221;submit&#8221; value=&#8221;ADD&#8221; name=&#8221;add&#8221;&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;/form&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;?</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">}</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">else</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">{</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">$c=$a+$b;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">print &#8220;Addition of $a and $b is $c.&#8221;;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">}</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">?&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;/body&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;/html&gt;</span></div>
<p><strong><span style="color: #ff0000;"><span style="font-size: medium;"><span style="font-family: georgia, palatino;">HTML with PHP :-</span></span></span></strong></p>
<p><span style="font-family: georgia, palatino;"><strong><span style="font-family: georgia, palatino;">HTML: </span></strong></span><span style="color: #0000ff;"><strong><span style="font-family: georgia, palatino;">add.htm</span></strong></span></p>
<p><span style="color: #0000ff;"><span style="font-family: georgia, palatino;">&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;Adding two numbers&lt;/title&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;form action=&#8221;add.php&#8221; method=&#8221;post&#8221;&gt;<br />
<span id="more-140"></span>Enter the first number: &lt;input type=&#8221;text&#8221; name=&#8221;a&#8221; size=10&gt;&lt;br&gt;<br />
Enter the second number: &lt;input type=&#8221;text&#8221; name=&#8221;b&#8221; size=10&gt;&lt;br&gt;<br />
&lt;input type=&#8221;submit&#8221; name=&#8221;submit&#8221; value=&#8221;ADD&#8221;&gt;<br />
&lt;/form&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</span></span></p>
<p><strong><span style="font-family: georgia, palatino;">PHP: </span><span style="color: #0000ff;"><span style="font-family: georgia, palatino;">add.php</span></span></strong></p>
<p><span style="color: #0000ff;"><span style="font-family: georgia, palatino;">&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;Adding two numbers&lt;/title&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;?php<br />
$a=$_POST["a"];<br />
$b=$_POST["b"];<br />
$c=$a+$b;<br />
print &#8220;Addition of $a and $b is $c.&#8221;;<br />
?&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</span></span></p>
<p><span style="font-family: georgia, palatino;"><span style="font-family: georgia, palatino;"><span style="font-family: georgia, palatino;"><br />
</span> </span><span style="font-family: georgia, palatino;"> </span></span></p>
<p><span style="font-family: georgia, palatino;"><strong><span style="color: #ff0000;"><span style="font-size: medium;"><span style="font-family: georgia, palatino;">Only with PHP :-</span></span></span></strong></span></p>
<p><span style="color: #0000ff;"><span style="font-family: georgia, palatino;">&lt;?php<br />
$a = $_POST["a"];<br />
$b = $_POST["b"];<br />
if (!isset($_POST['add']))<br />
{  // If page is not submitted to itself echo the form<br />
?&gt;<br />
&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;Adding Two Numbers&lt;/title&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;form method=&#8221;post&#8221; action=&#8221;&lt;?php echo $PHP_SELF; ?&gt;&#8221;&gt;<br />
Enter the first number: &lt;input type=&#8221;text&#8221; size=&#8221;12&#8243; maxlength=&#8221;12&#8243; name=&#8221;a&#8221;&gt;&lt;/br&gt;<br />
Enter the second number: &lt;input type=&#8221;text&#8221; size=&#8221;12&#8243; maxlength=&#8221;36&#8243; name=&#8221;b&#8221;&gt;&lt;/br&gt;<br />
&lt;input type=&#8221;submit&#8221; value=&#8221;ADD&#8221; name=&#8221;add&#8221;&gt;<br />
&lt;/form&gt;<br />
&lt;?<br />
}<br />
else<br />
{<br />
$c=$a+$b;<br />
print &#8220;Addition of $a and $b is $c.&#8221;;<br />
}<br />
?&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</span></span></p>
<p><span style="color: #0000ff;"><span style="font-family: georgia, palatino;"><br />
</span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.biogem.org/2009/12/two-methods-to-run-php-script.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux wvdial.conf script for Vodafone IN</title>
		<link>http://www.biogem.org/2009/12/linux-wvdial-conf-script-for-vodafone-in.html</link>
		<comments>http://www.biogem.org/2009/12/linux-wvdial-conf-script-for-vodafone-in.html#comments</comments>
		<pubDate>Tue, 08 Dec 2009 16:37:46 +0000</pubDate>
		<dc:creator>Ashok Kumar</dc:creator>
				<category><![CDATA[Information Technology]]></category>
		<category><![CDATA[portalnms]]></category>
		<category><![CDATA[Vodafone IN]]></category>
		<category><![CDATA[wvdial.conf]]></category>

		<guid isPermaLink="false">http://www.biogem.org/?p=135</guid>
		<description><![CDATA[[Modem0]
Modem = /dev/rfcomm0
Baud = 115200
SetVolume = 0
Dial Command = ATDT
Init1 = ATZ
Init3= ATM0
FlowControl = CRTSCTS
[Dialer vodafone]
Username = &#8220;vodafone&#8221;
Password = &#8220;vodafone&#8221;
Phone = *99#
Stupid Mode = 1
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &#38;C1 &#38;D2 +FCLASS=0
Init3 = AT+CGDCONT=1,&#8221;10.10.1.100:9401&#8243;,&#8221;portalnmms&#8221;,&#8221;",0,0
Inherits = Modem0
[Dialer three]
Username = &#8220;none&#8221;
Password = &#8220;none&#8221;
Phone = *99#
Stupid Mode = 1
Init1 = ATZ
Init2 = ATQ0 V1 E1 [...]]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: 'courier new', courier;">[Modem0]</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: 'courier new', courier;">Modem = /dev/rfcomm0</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: 'courier new', courier;">Baud = 115200</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: 'courier new', courier;">SetVolume = 0</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: 'courier new', courier;">Dial Command = ATDT</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: 'courier new', courier;">Init1 = ATZ</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: 'courier new', courier;">Init3= ATM0</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: 'courier new', courier;">FlowControl = CRTSCTS</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: 'courier new', courier;">[Dialer vodafone]</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: 'courier new', courier;">Username = &#8220;vodafone&#8221;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: 'courier new', courier;">Password = &#8220;vodafone&#8221;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: 'courier new', courier;">Phone = *99#</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: 'courier new', courier;">Stupid Mode = 1</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: 'courier new', courier;">Init1 = ATZ</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: 'courier new', courier;">Init2 = ATQ0 V1 E1 S0=0 &amp;C1 &amp;D2 +FCLASS=0</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: 'courier new', courier;">Init3 = AT+CGDCONT=1,&#8221;10.10.1.100:9401&#8243;,&#8221;portalnmms&#8221;,&#8221;",0,0</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: 'courier new', courier;">Inherits = Modem0</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: 'courier new', courier;">[Dialer three]</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: 'courier new', courier;">Username = &#8220;none&#8221;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: 'courier new', courier;">Password = &#8220;none&#8221;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: 'courier new', courier;">Phone = *99#</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: 'courier new', courier;">Stupid Mode = 1</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: 'courier new', courier;">Init1 = ATZ</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: 'courier new', courier;">Init2 = ATQ0 V1 E1 S0=0 &amp;C1 &amp;D2 +FCLASS=0</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: 'courier new', courier;">Init3 = AT+CGDCONT=1,&#8221;10.10.1.100:9401&#8243;,&#8221;portalnmms&#8221;,&#8221;",0,0</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: 'courier new', courier;">Inherits = Modem0</span></div>
<div></div>
<div><span style="font-family: 'courier new', courier; font-size: small;">[Modem0]</span></div>
<div><span style="font-size: small;"><span style="font-family: 'courier new', courier;">Modem = /dev/rfcomm0</span></span></div>
<div><span style="font-size: small;"><span style="font-family: 'courier new', courier;">Baud = 115200<br />
<span id="more-135"></span></span></span></div>
<div><span style="font-size: small;"><span style="font-family: 'courier new', courier;">SetVolume = 0</span></span></div>
<div><span style="font-size: small;"><span style="font-family: 'courier new', courier;">Dial Command = ATDT</span></span></div>
<div><span style="font-size: small;"><span style="font-family: 'courier new', courier;">Init1 = ATZ</span></span></div>
<div><span style="font-size: small;"><span style="font-family: 'courier new', courier;">Init3 = ATM0</span></span></div>
<div><span style="font-size: small;"><span style="font-family: 'courier new', courier;">FlowControl = CRTSCTS</span></span></div>
<div><span style="font-size: small;"><span style="font-family: 'courier new', courier;"><span style="font-family: 'courier new', courier;"><br />
</span> </span></span></div>
<div><span style="font-size: small;"><span style="font-family: 'courier new', courier;">[Dialer </span><span style="color: #0000ff;"><span style="font-family: 'courier new', courier;">vodafone</span></span><span style="font-family: 'courier new', courier;">]</span></span></div>
<div><span style="font-size: small;"><span style="font-family: 'courier new', courier;">Username = &#8220;</span><span style="color: #0000ff;"><span style="font-family: 'courier new', courier;">vodafone</span></span><span style="font-family: 'courier new', courier;">&#8220;</span></span></div>
<div><span style="font-size: small;"><span style="font-family: 'courier new', courier;">Password = &#8220;</span><span style="color: #0000ff;"><span style="font-family: 'courier new', courier;">vodafone</span></span><span style="font-family: 'courier new', courier;">&#8220;</span></span></div>
<div><span style="font-size: small;"><span style="font-family: 'courier new', courier;">Phone = </span><span style="color: #0000ff;"><span style="font-family: 'courier new', courier;">*99#</span></span></span></div>
<div><span style="font-size: small;"><span style="font-family: 'courier new', courier;">Stupid Mode = 1</span></span></div>
<div><span style="font-size: small;"><span style="font-family: 'courier new', courier;">Init1 = ATZ</span></span></div>
<div><span style="font-size: small;"><span style="font-family: 'courier new', courier;">Init2 = ATQ0 V1 E1 S0=0 &amp;C1 &amp;D2 +FCLASS=0</span></span></div>
<div><span style="font-size: small;"><span style="font-family: 'courier new', courier;">Init3 = AT+CGDCONT=1,&#8221;</span><span style="color: #0000ff;"><span style="font-family: 'courier new', courier;">10.10.1.100:9401</span></span><span style="font-family: 'courier new', courier;">&#8220;,&#8221;</span><span style="color: #0000ff;"><span style="font-family: 'courier new', courier;">portalnmms</span></span><span style="font-family: 'courier new', courier;">&#8220;,&#8221;",0,0</span></span></div>
<div><span style="font-size: small;"><span style="font-family: 'courier new', courier;">Inherits = Modem0</span></span></div>
<div><span style="font-size: small;"><span style="font-family: 'courier new', courier;"><span style="font-family: 'courier new', courier;"><br />
</span> </span></span></div>
<div><span style="font-size: small;"><span style="font-family: 'courier new', courier;">[Dialer three]</span></span></div>
<div><span style="font-size: small;"><span style="font-family: 'courier new', courier;">Username = &#8220;</span><span style="color: #0000ff;"><span style="font-family: 'courier new', courier;">none</span></span><span style="font-family: 'courier new', courier;">&#8220;</span></span></div>
<div><span style="font-size: small;"><span style="font-family: 'courier new', courier;">Password = &#8220;</span><span style="color: #0000ff;"><span style="font-family: 'courier new', courier;">none</span></span><span style="font-family: 'courier new', courier;">&#8220;</span></span></div>
<div><span style="font-size: small;"><span style="font-family: 'courier new', courier;">Phone = </span><span style="color: #0000ff;"><span style="font-family: 'courier new', courier;">*99#</span></span></span></div>
<div><span style="font-size: small;"><span style="font-family: 'courier new', courier;">Stupid Mode = 1</span></span></div>
<div><span style="font-size: small;"><span style="font-family: 'courier new', courier;">Init1 = ATZ</span></span></div>
<div><span style="font-size: small;"><span style="font-family: 'courier new', courier;">Init2 = ATQ0 V1 E1 S0=0 &amp;C1 &amp;D2 +FCLASS=0</span></span></div>
<div><span style="font-size: small;"><span style="font-family: 'courier new', courier;">Init3 = AT+CGDCONT=1,&#8221;</span><span style="color: #0000ff;"><span style="font-family: 'courier new', courier;">10.10.1.100:9401</span></span><span style="font-family: 'courier new', courier;">&#8220;,&#8221;</span><span style="color: #0000ff;"><span style="font-family: 'courier new', courier;">portalnmms</span></span><span style="font-family: 'courier new', courier;">&#8220;,&#8221;",0,0</span></span></div>
<div><span style="font-size: small;"><span style="font-family: 'courier new', courier;">Inherits = Modem0</span></span></div>
<div><span style="font-family: 'courier new', courier;"><br />
</span></div>
<div><span style="font-size: small;"><span style="font-family: 'courier new', courier;"><br />
</span></span></div>
]]></content:encoded>
			<wfw:commentRss>http://www.biogem.org/2009/12/linux-wvdial-conf-script-for-vodafone-in.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Running C or C++ program in Linux</title>
		<link>http://www.biogem.org/2009/12/running-c-or-c-program-in-linux.html</link>
		<comments>http://www.biogem.org/2009/12/running-c-or-c-program-in-linux.html#comments</comments>
		<pubDate>Fri, 04 Dec 2009 02:11:57 +0000</pubDate>
		<dc:creator>Ashok Kumar</dc:creator>
				<category><![CDATA[Information Technology]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[CPP]]></category>

		<guid isPermaLink="false">http://www.biogem.org/?p=90</guid>
		<description><![CDATA[Steps to run C program in Ubuntu:
1. Go to Applications &#62; Accessories &#62; Terminal, to open terminal window.
2. Type the following in command line
sudo gedit first.c
3. Enter the code bellow in the editor.
/* Program first.c */
#include&#60;stdio.h&#62;
main()
{
printf(&#8221;Hello World.\n&#8221;);
}
4. Save the file and close to return to terminal window.
5. Firstly compile the code using the following command
cc [...]]]></description>
			<content:encoded><![CDATA[<p><span style="font-family: georgia,palatino;"><span style="font-size: small;"><span style="color: #ff0000;"><span style="font-size: medium;"><strong>Steps to run C program in Ubuntu:</strong></span></span></span></span></p>
<p><span style="font-family: georgia,palatino;">1. Go to <em>Applications</em> &gt; <em>Accessories</em> &gt; <em>Terminal</em>, to open terminal window.</span></p>
<p><span style="font-family: georgia,palatino;">2. Type the following in command line</span></p>
<p><span style="font-family: georgia,palatino;"><span style="color: #0000ff;"><em>sudo gedit first.c<span id="more-90"></span></em></span></span></p>
<p><span style="font-family: georgia,palatino;">3. Enter the code bellow in the editor.</span></p>
<p><span style="font-family: georgia,palatino;"><span style="color: #0000ff;"><em>/* Program first.c */<br />
#include&lt;stdio.h&gt;<br />
main()<br />
{<br />
printf(&#8221;Hello World.\n&#8221;);<br />
}</em></span></span></p>
<p><span style="font-family: georgia,palatino;">4. Save the file and close to return to terminal window.</span></p>
<p><span style="font-family: georgia,palatino;">5. Firstly compile the code using the following command</span></p>
<p><span style="font-family: georgia,palatino;"><span style="color: #0000ff;"><em>cc -c first.c</em></span></span></p>
<p><span style="font-family: georgia,palatino;">That would produce an object file you may need to add to the library.</span></p>
<p><span style="font-family: georgia,palatino;">6. Then create an executable using the following command</span></p>
<p><span style="font-family: georgia,palatino;"><span style="color: #0000ff;"><em>cc -o first first.c</em></span></span></p>
<p><span style="font-family: georgia,palatino;">7. Now run this executable using the following command</span></p>
<p><span style="font-family: georgia,palatino;"><span style="color: #0000ff;"><em>./first</em></span></span></p>
<p><span style="font-family: georgia,palatino;">8. Output should show as follows</span></p>
<p><span style="font-family: georgia,palatino;"><span style="color: #ff0000;"><em>Hello World.<br />
</em></span></span></p>
<p><span style="font-family: georgia,palatino;"><span style="color: #ff0000;"><span style="font-size: medium;"><strong>Steps to run C++ program in Ubuntu:</strong></span></span></span></p>
<p><span style="font-family: georgia,palatino;">1. Go to <em>Applications</em> &gt; <em>Accessories</em> &gt; <em>Terminal</em>, to open terminal window.</span></p>
<p><span style="font-family: georgia,palatino;">2. Type the following in command line</span></p>
<p><span style="font-family: georgia,palatino;"><span style="color: #0000ff;"><em>sudo gedit first.cpp</em></span></span></p>
<p><span style="font-family: georgia,palatino;">3. Enter the code bellow in the editor.</span></p>
<p><span style="font-family: georgia,palatino;"><em><span style="color: #0000ff;">/* Program first.cpp */<br />
#include&lt;iostream&gt;<br />
main()<br />
{<br />
std::cout&lt;&lt;&#8221;Hello World.&#8221;&lt;&lt;std::endl;<br />
}</span></em></span></p>
<p><span style="font-family: georgia,palatino;">4. Save the file and close to return to terminal window.</span></p>
<p><span style="font-family: georgia,palatino;">5. Now compile the code using the following command</span></p>
<p><span style="font-family: georgia,palatino;"><span style="color: #0000ff;"><em>g++ first.cpp -o second</em></span></span></p>
<p><span style="font-family: georgia,palatino;">6. Then run this executable using the following command</span></p>
<p><span style="font-family: georgia,palatino;"><span style="color: #0000ff;"><em>./second</em></span></span></p>
<p><span style="font-family: georgia,palatino;">7. Output should show as follows</span></p>
<p><span style="font-family: georgia,palatino;"><span style="color: #ff0000;"><em>Hello World.<br />
</em></span></span></p>
<p><span style="font-family: georgia,palatino;"><span style="color: #ff0000;"><strong><span style="font-size: medium;">A sample factorial program in C</span></strong></span></span></p>
<p><span style="font-family: georgia,palatino;"><span style="color: #0000ff;"><em>/* Factorial using C */<br />
#include&lt;stdio.h&gt;<br />
int main()<br />
{<br />
int i,n,f=1;<br />
printf(&#8221;\nEnter the number: &#8220;);<br />
scanf(&#8221;%d&#8221;,&amp;n);<br />
for(i=1;i&lt;=n;i++)<br />
{<br />
f=f*i;<br />
}<br />
printf(&#8221;\nFactorial of %d is %d \n\n&#8221;,n,f);<br />
}</em><br />
</span></span></p>
<p><span style="font-family: georgia,palatino;"><strong>Output:</strong><br />
<span style="color: #0000ff;"><em><br />
$ sudo gedit factorial.c<br />
$ cc -c factorial.c<br />
$ cc -o factorial factorial.c<br />
$ ./factorial</em></span></span></p>
<p><span style="font-family: georgia,palatino;"><span style="color: #ff0000;"><em>Enter the number: 6<br />
Factorial of 6 is 720</em></span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.biogem.org/2009/12/running-c-or-c-program-in-linux.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Addition using Perl/CGI in Ubuntu</title>
		<link>http://www.biogem.org/2009/12/addition-using-perlcgi-in-ubuntu.html</link>
		<comments>http://www.biogem.org/2009/12/addition-using-perlcgi-in-ubuntu.html#comments</comments>
		<pubDate>Thu, 03 Dec 2009 03:26:03 +0000</pubDate>
		<dc:creator>Ashok Kumar</dc:creator>
				<category><![CDATA[Information Technology]]></category>
		<category><![CDATA[Addition]]></category>
		<category><![CDATA[Perl/CGI]]></category>

		<guid isPermaLink="false">http://www.biogem.org/?p=83</guid>
		<description><![CDATA[If Apache web server has installed in your system, you can run Perl/CGI script successfully. Create a html file and perl script using following steps.



Step 1: Creating a web page add.html
Open your console and type:
$ sudo gedit /var/www/add.html
Copy the lines below in the file and save it.

&#60;html&#62;
&#60;head&#62;
&#60;title&#62;Addition of two numbers.&#60;/title&#62;
&#60;/head&#62;
&#60;body&#62;
&#60;br&#62;&#60;br&#62;&#60;br&#62;&#60;br&#62;&#60;br&#62;
&#60;form action=&#8217;cgi-bin/add.pl&#8217; method=&#8217;post&#8217; enctype=&#8217;multipart/form_data&#8217;&#62;
&#60;table border=&#8217;0&#8242; align=&#8217;center&#8217;&#62;
&#60;tr&#62;&#60;td [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><span style="font-family: georgia,palatino;">If Apache web server has installed in your system, you can run Perl/CGI script successfully. Create a html file and perl script using following steps.</span></p>
<p><span id="more-83"></span></p>
<p style="text-align: justify;"><span style="font-family: georgia,palatino;"><br />
</span></p>
<p style="text-align: justify;"><span style="font-family: georgia,palatino;"><strong>Step 1:</strong> Creating a web page add.html</span></p>
<p style="text-align: justify;"><span style="font-family: georgia,palatino;">Open your console and type:</span></p>
<p style="text-align: justify;"><span style="color: #ff0000;">$ sudo gedit /var/www/add.html</span></p>
<p style="text-align: justify;"><span style="font-family: georgia,palatino;">Copy the lines below in the file and save it.<strong><br />
</strong></span></p>
<p style="text-align: justify;"><span style="color: #008000;">&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;Addition of two numbers.&lt;/title&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;<br />
&lt;form action=&#8217;cgi-bin/add.pl&#8217; method=&#8217;post&#8217; enctype=&#8217;multipart/form_data&#8217;&gt;<br />
&lt;table border=&#8217;0&#8242; align=&#8217;center&#8217;&gt;<br />
&lt;tr&gt;&lt;td colspan=&#8217;2&#8242; align=&#8217;center&#8217;&gt;<br />
&lt;b&gt;Adding Two Numbers&lt;/b&gt;<br />
&lt;/td&gt;&lt;/tr&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt;Enter the first value:&lt;/td&gt;<br />
&lt;td&gt;&lt;INPUT TYPE =&#8217;text&#8217; NAME=&#8217;n1&#8242;&gt;&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt;Enter the second value:&lt;/td&gt;<br />
&lt;td&gt;&lt;INPUT TYPE =&#8217;text&#8217; NAME=&#8217;n2&#8242;&gt;&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;tr&gt;&lt;td colspan=&#8217;2&#8242; align=&#8217;center&#8217;&gt;<br />
&lt;INPUT TYPE =&#8217;submit&#8217; VALUE=&#8217;ADD&#8217; NAME=&#8217;submit&#8217;&gt;<br />
&lt;/td&gt;&lt;/tr&gt;<br />
&lt;/table&gt;<br />
&lt;/form&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</span></p>
<p style="text-align: justify;"><span style="font-family: georgia,palatino;"><br />
</span></p>
<p style="text-align: justify;"><span style="font-family: georgia,palatino;"><strong>Step 2:</strong> Creating a perl script add.pl</span></p>
<p style="text-align: justify;"><span style="font-family: georgia,palatino;">Open your console and type:</span></p>
<p style="text-align: justify;"><span style="color: #ff0000;"> $ sudo gedit /usr/lib/cgi-bin/add.pl<br />
$ sudo chmod a+x /usr/lib/cgi-bin/add.pl</span></p>
<p style="text-align: justify;"><span style="font-family: georgia,palatino;">The command <span style="color: #ff0000;">chmod a+x</span><strong> </strong>is used to allow permission to run the script. Without using this command your program will not run. !!!</span></p>
<p style="text-align: justify;"><span style="font-family: georgia,palatino;">Copy the lines below in the file and save it.<strong><br />
</strong></span></p>
<p style="text-align: justify;"><span style="color: #008000;">#!/usr/bin/perl -w<br />
use CGI;<br />
CGI::ReadParse();<br />
$numb1 = $in{&#8217;n1&#8242;};<br />
chomp($numb1);<br />
$numb2 = $in{&#8217;n2&#8242;};<br />
chomp($numb2);<br />
$numb3=$numb1+$numb2;<br />
CGI::PrintHeader();<br />
print &#8220;content-type:text/html\n\n&#8221;;<br />
print &#8220;&lt;HTML&gt;\n&#8221;;<br />
print &#8220;&lt;head&gt;&lt;title&gt;Addition of two numbers&lt;/title&gt;&lt;/head&gt;\n&#8221;;<br />
print &#8220;&lt;body&gt;\n&#8221;;<br />
print &#8220;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;center&gt;Addition of $numb1 and $numb2 is $numb3.&lt;/center&gt;\n&#8221;;<br />
print &#8220;&lt;/body&gt;\n&#8221;;<br />
print &#8220;&lt;/html&gt;\n&#8221;;</span></p>
<p style="text-align: justify;"><span style="font-family: georgia,palatino;"><br />
</span></p>
<p style="text-align: justify;"><span style="font-family: georgia,palatino;"><strong>Step 3:</strong> Running the program</span></p>
<p style="text-align: justify;"><span style="font-family: georgia,palatino;">Open web browser and hit address <span style="color: #0000ff;"><a href="http://localhost/add.html">http://localhost/add.html</a></span> to run the Perl/CGI program.</span></p>
<p style="text-align: justify;"><span style="font-family: georgia,palatino;"><br />
</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.biogem.org/2009/12/addition-using-perlcgi-in-ubuntu.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Installing LAMP on Ubuntu 9.10</title>
		<link>http://www.biogem.org/2009/11/installing-lamp-on-ubuntu-9-10.html</link>
		<comments>http://www.biogem.org/2009/11/installing-lamp-on-ubuntu-9-10.html#comments</comments>
		<pubDate>Mon, 30 Nov 2009 02:40:33 +0000</pubDate>
		<dc:creator>Ashok Kumar</dc:creator>
				<category><![CDATA[Information Technology]]></category>
		<category><![CDATA[LAMP]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[phpMyAdmin]]></category>
		<category><![CDATA[Ubuntu 9.10]]></category>

		<guid isPermaLink="false">http://www.biogem.org/?p=44</guid>
		<description><![CDATA[
Installing and configuring LAMP (Linux, Apache, MySQL, and PHP) is easy in Ubuntu Linux. If you have internet connection in your system, you can able to download the necessary applications using apt-get or synaptic package manager tools.

In this tutorial, I have given step-by-step procedure to setup LAMP web server environment in Ubuntu 9.10 operating system.

Installing [...]]]></description>
			<content:encoded><![CDATA[<blockquote>
<p style="text-align: justify;"><em><span style="font-family: georgia, palatino;">Installing and configuring LAMP </span></em><span style="font-family: georgia, palatino;">(</span><em><strong><span style="color: #ff0000;"><span style="font-family: georgia, palatino;">L</span></span></strong><span style="font-family: georgia, palatino;">inux, </span><strong><span style="color: #ff0000;"><span style="font-family: georgia, palatino;">A</span></span></strong><span style="font-family: georgia, palatino;">pache, </span><strong><span style="color: #ff0000;"><span style="font-family: georgia, palatino;">M</span></span></strong><span style="font-family: georgia, palatino;">ySQL, and </span><strong><span style="color: #ff0000;"><span style="font-family: georgia, palatino;">P</span></span></strong><span style="font-family: georgia, palatino;">HP</span></em><span style="font-family: georgia, palatino;">)</span><em><span style="font-family: georgia, palatino;"> is easy in Ubuntu Linux. If you have internet connection in your system, you can able to download the necessary applications using apt-get or synaptic package manager tools.</span></em></p>
</blockquote>
<p style="text-align: justify;"><span style="font-family: georgia, palatino;">In this tutorial, I have given step-by-step procedure to setup LAMP web server environment in Ubuntu 9.10 operating system.</span></p>
<p><span id="more-44"></span></p>
<h3><span style="color: #ff0000;"><span style="font-family: georgia, palatino;">Installing Apache:</span></span></h3>
<p><span style="font-family: georgia, palatino;">The first application we will install is the web server Apache. To get started open your console and type:</span></p>
<p><span style="color: #0000ff;"><span style="font-family: georgia, palatino;">sudo apt-get install apache2</span></span></p>
<p style="text-align: justify;"><span style="font-family: georgia, palatino;">Now enter the system password to download and install automatically. To test it, point your web browser to </span><a href="http://localhost/"><span style="color: #0000ff;"><span style="font-family: georgia, palatino;">http://localhost/</span></span></a><span style="font-family: georgia, palatino;">. If installation is successful, a text “</span><span style="color: #ff0000;"><span style="font-family: georgia, palatino;">It Works!</span></span><span style="font-family: georgia, palatino;">” will display.</span></p>
<p><span style="font-family: georgia, palatino;">The location for saving webpages and script files are as follows.</span></p>
<p><span style="color: #ff0000;"><span style="font-family: georgia, palatino;">Web Pages:</span></span><span style="font-family: georgia, palatino;"><span style="font-family: georgia, palatino;"> /var/www<br />
</span><span style="font-family: georgia, palatino;"> </span></span><span style="font-family: georgia, palatino;"> </span><span style="color: #ff0000;"><span style="font-family: georgia, palatino;">Script Files:</span></span><span style="font-family: georgia, palatino;"><span style="font-family: georgia, palatino;"> /usr/lib/cgi-bin<br />
</span><span style="font-family: georgia, palatino;"> </span></span><span style="font-family: georgia, palatino;"> </span><span style="color: #ff0000;"><span style="font-family: georgia, palatino;">Apache Configuration:</span></span><span style="color: #ff0000;"><span style="font-family: georgia, palatino;"> </span></span><span style="font-family: georgia, palatino;">/etc/apache2/sites-available</span></p>
<p style="text-align: justify;"><span style="font-family: georgia, palatino;">You can access the webpages using default address</span><strong><span style="font-family: georgia, palatino;"> </span><a href="http://127.0.0.1"><span style="color: #0000ff;"><span style="font-family: georgia, palatino;"><span style="font-weight: normal;">127.0.0.1</span></span></span></a></strong><span style="font-family: georgia, palatino;">,</span><strong><span style="font-family: georgia, palatino;"> </span><a href="http://ASHOK/"><span style="color: #0000ff;"><span style="font-family: georgia, palatino;"><span style="font-weight: normal;">system name</span></span></span></a></strong><span style="font-family: georgia, palatino;">, or </span><a href="http://localhost"><span style="color: #0000ff;"><span style="font-family: georgia, palatino;">localhost</span></span></a><span style="font-family: georgia, palatino;">. If you wish to setup your own domain name, follow the steps bellow. (In this tutorial, i have chosen </span><a href="http://www.ashok.com"><span style="color: #0000ff;"><span style="font-family: georgia, palatino;">www.ashok.com</span></span></a><span style="font-family: georgia, palatino;"> as my domain name.)</span></p>
<p style="text-align: justify;"><span style="color: #0000ff;"><span style="font-family: georgia, palatino;">sudo gedit /etc/hosts</span></span></p>
<p style="text-align: justify;"><span style="font-family: georgia, palatino;">Add &#8220;</span><span style="color: #ff0000;"><span style="font-family: georgia, palatino;">127.0.0.1         www.ashok.com</span></span><span style="font-family: georgia, palatino;">&#8221; in the hosts file and save it. Now the problem is almost solved. To avoid errors in configurations, do the bellow steps too.</span></p>
<p><span style="font-family: georgia, palatino;">The first step is to make a copy of the original configuration file.</span></p>
<p><span style="color: #0000ff;"><span style="font-family: georgia, palatino;">sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/ashok.com</span></span></p>
<p><span style="font-family: georgia, palatino;">The second step is to change the configuration file to your own domain name.</span></p>
<p><span style="color: #0000ff;"><span style="font-family: georgia, palatino;">sudo gedit /etc/apache2/sites-available/ashok.com</span></span></p>
<p><span style="font-family: georgia, palatino;"><span style="font-family: georgia, palatino;">Add few lines in the configuration file (</span><em><span style="font-family: georgia, palatino;">shown in blue color</span></em><span style="font-family: georgia, palatino;">)</span></span><span style="font-family: georgia, palatino;"> as given bellow.</span></p>
<p><span style="color: #ff0000;"><span style="font-family: georgia, palatino;">&lt;VirtualHost *:80&gt;</span></span></p>
<p><span style="color: #0000ff;"><span style="font-family: georgia, palatino;">ServerAdmin webmaster@ashok.com<br />
DocumentRoot /var/www<br />
ServerName ashok.com<br />
ServerAlias www.ashok.com</span></span></p>
<p><span style="color: #ff0000;"><span style="font-family: georgia, palatino;">&lt;Directory /&gt;<br />
Options FollowSymLinks<br />
AllowOverride None<br />
&lt;/Directory&gt;<br />
:<br />
:<br />
.</span></span></p>
<p><span style="font-family: georgia, palatino;">The third step is to active new domain </span><span style="color: #ff0000;"><span style="font-family: georgia, palatino;"><a href="http://www.ashok.com/">ashok.com</a></span></span><span style="font-family: georgia, palatino;"> and deactivate old domain.</span></p>
<p><span style="color: #0000ff;"><span style="font-family: georgia, palatino;">sudo a2ensite ashok.com &amp;&amp; a2dissite default</span></span></p>
<p><span style="font-family: georgia, palatino;">Finally restart the Apache web server.</span></p>
<p><span style="color: #0000ff;"><span style="font-family: georgia, palatino;">/etc/init.d/apache2 reload</span></span></p>
<p><span style="font-family: georgia, palatino;">Your own domain name has been configured successfully.</span></p>
<h3><span style="color: #ff0000;"><span style="font-family: georgia, palatino;">Installing PHP:</span></span></h3>
<p><span style="font-family: georgia, palatino;">The second application we will install is the PHP. To get started open your console and type:</span></p>
<p><span style="color: #0000ff;"><span style="font-family: georgia, palatino;">sudo apt-get install php5 libapache2-mod-php5</span></span></p>
<p><span style="font-family: georgia, palatino;">Once this finishes we need to restart Apache. This will apply the changes.</span></p>
<p><span style="color: #0000ff;"><span style="font-family: georgia, palatino;">sudo /etc/init.d/apache2 restart</span></span></p>
<p><span style="font-family: georgia, palatino;">Now let’s test it by replacing ‘</span><span style="color: #ff0000;"><span style="font-family: georgia, palatino;">/var/www/index.html</span></span><span style="font-family: georgia, palatino;">‘ with</span><strong><span style="font-family: georgia, palatino;"> </span><span style="color: #ff0000;"><span style="font-family: georgia, palatino;"><span style="font-weight: normal;"><a href="http://localhost/index.php">index.php</a></span></span></span></strong><span style="font-family: georgia, palatino;"> using command:</span></p>
<p><span style="color: #0000ff;"><span style="font-family: georgia, palatino;">sudo cp /var/www/index.html /var/www/index.php</span></span></p>
<p style="text-align: justify;"><span style="font-family: georgia, palatino;">Replace the line with </span><span style="color: #ff0000;"><span style="font-family: georgia, palatino;">&lt;?php phpinfo(); ?&gt;</span></span><span style="font-family: georgia, palatino;"> in </span><span style="color: #ff0000;"><span style="font-family: georgia, palatino;">index.php</span></span><span style="font-family: georgia, palatino;"> file through an editor, using command &#8216;</span><span style="color: #ff0000;"><span style="font-family: georgia, palatino;">sudo /var/www/index.php</span></span><span style="font-family: georgia, palatino;">&#8216;. If PHP is installed properly, the page will display the information about installed modules of PHP.</span></p>
<h3><span style="color: #ff0000;"><span style="font-family: georgia, palatino;">Installing MySQL with PHP5:</span></span></h3>
<p><span style="font-family: georgia, palatino;">Install all the MySQL stuff:</span></p>
<p><span style="color: #0000ff;"><span style="font-family: georgia, palatino;">sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql</span></span></p>
<p style="text-align: justify;"><span style="font-family: georgia, palatino;">When you get a prompt enter a password you would like to use as the root MySQL user. Once done open, ‘</span><span style="color: #ff0000;"><span style="font-family: georgia, palatino;">sudo gedit /etc/mysql/my.cnf</span></span><span style="font-family: georgia, palatino;">‘ and change the bind-address to your local IP. (Usually </span><strong><span style="color: #ff0000;"><span style="font-family: georgia, palatino;"><span style="font-weight: normal;">192.x.x.x</span></span></span><span style="font-family: georgia, palatino;"> </span></strong><span style="font-family: georgia, palatino;">number). </span><em><span style="font-family: georgia, palatino;">Note that this can be a  security problem, because your database can be accessed by others  computers than your own. Skip this step if the applications which  require MySQL are running on the same machine.</span></em></p>
<p style="text-align: justify;"><span style="font-family: georgia, palatino;">Change the line </span><span style="color: #0000ff;"><span style="font-family: georgia, palatino;">bind-address = localhost</span></span><span style="font-family: georgia, palatino;"> to your own internal ip address ( e.g. </span><span style="color: #0000ff;"><span style="font-family: georgia, palatino;">192.168.1.1</span></span><span style="font-family: georgia, palatino;"> as </span><span style="color: #0000ff;"><span style="font-family: georgia, palatino;">bind-address = 192.168.1.1</span></span><span style="font-family: georgia, palatino;">). If no need, skip this statement.</span></p>
<p><span style="font-family: georgia, palatino;">If your ip address is dynamic you can also comment out the bind-address  line and it will default to your current ip.</span></p>
<p><span style="text-decoration: underline;"><span style="font-family: georgia, palatino;"><span style="font-family: georgia, palatino;"><br />
</span><span style="font-family: georgia, palatino;"> </span></span><span style="font-family: georgia, palatino;"> </span></span></p>
<h3><span style="text-decoration: underline;"><span style="color: #ff0000;"><span style="font-family: georgia, palatino;">Extra Stuff:</span></span></span></h3>
<h4><span style="color: #ff0000;"><span style="font-family: georgia, palatino;">Installing phpMyAdmin:</span></span></h4>
<p style="text-align: justify;"><span style="font-family: georgia, palatino;">All MySQL tasks including setting the root password and creating databases  can be done via a graphical interface using phpMyAdmin or MySQL-Admin.</span></p>
<p><span style="color: #0000ff;"><span style="font-family: georgia, palatino;">sudo apt-get install phpmyadmin</span></span></p>
<p><span style="font-family: georgia, palatino;">After phpMyAdmin is installed you can see it view it, </span><a href="http://localhost/phpmyadmin/"><span style="color: #0000ff;"><span style="font-family: georgia, palatino;">http://localhost/phpmyadmin/</span></span></a><span style="font-family: georgia, palatino;">.</span></p>
<p><span style="color: #ff0000;"><span style="font-family: georgia, palatino;">User Name:</span></span><span style="font-family: georgia, palatino;"><span style="font-family: georgia, palatino;"> phpmyadmin<br />
</span><span style="font-family: georgia, palatino;"> </span></span><span style="font-family: georgia, palatino;"> </span><span style="color: #ff0000;"><span style="font-family: georgia, palatino;">Password:</span></span><span style="font-family: georgia, palatino;"> your_password</span></p>
<p style="text-align: justify;"><span style="font-family: georgia, palatino;">Now, you have to grant permission to create or modify database. To do this you must be a super user (</span><span style="color: #ff0000;"><span style="font-family: georgia, palatino;">su</span></span><span style="font-family: georgia, palatino;">). By default Ubuntu offers only </span><span style="color: #ff0000;"><span style="font-family: georgia, palatino;">sudo</span></span><span style="font-family: georgia, palatino;"> mode. To be safe, create new root password:</span></p>
<p><span style="color: #0000ff;"><span style="font-family: georgia, palatino;">sudo passwd root</span></span></p>
<p><span style="font-family: georgia, palatino;">Keep the </span><span style="color: #ff0000;"><span style="font-family: georgia, palatino;">su</span></span><span style="font-family: georgia, palatino;"> password safely. It is needed to control every operations in Ubuntu. Remember that </span><span style="color: #ff0000;"><span style="font-family: georgia, palatino;">sudo</span></span><span style="font-family: georgia, palatino;"> and </span><span style="color: #ff0000;"><span style="font-family: georgia, palatino;">su</span></span><span style="font-family: georgia, palatino;"> password are different. !!!</span></p>
<p><span style="font-family: georgia, palatino;">Open your console and type:</span></p>
<p><span style="color: #0000ff;"><span style="font-family: georgia, palatino;">su</span></span></p>
<p><span style="color: #0000ff;"><span style="font-family: georgia, palatino;">/etc/init.d/mysql start</span></span></p>
<p><span style="color: #0000ff;"><span style="font-family: georgia, palatino;">mysql -u root -p</span></span></p>
<p><span style="color: #0000ff;"><span style="font-family: georgia, palatino;">mysql&gt;GRANT ALL PRIVILEGES ON *.* TO &#8216;phpmyadmin@localhost&#8217; IDENTIFIED BY &#8216;your_password&#8217; WITH GRANT OPTION;</span></span></p>
<p><span style="font-family: georgia, palatino;">You can now able to create or modify tables through graphical interface of phpMyAdmin.</span></p>
<h4><span style="color: #ff0000;"><span style="font-family: georgia, palatino;">mod_rewrite:</span></span></h4>
<p style="text-align: justify;"><span style="font-family: georgia, palatino;">Chances are you want to use mod_rewrite in your applications to make URLs a bit more pretty. It is also required by lots of webserver applications, like WordPress, Drupal, etc.</span></p>
<p><span style="font-family: georgia, palatino;">Do the following:</span></p>
<p><span style="color: #0000ff;"><span style="font-family: georgia, palatino;">sudo a2enmod rewrite</span></span></p>
<p><span style="color: #0000ff;"><span style="font-family: georgia, palatino;">/etc/init.d/apache2 restart</span></span></p>
<h4><span style="color: #ff0000;"><span style="font-family: georgia, palatino;">Method to Start / Stop Apache:</span></span></h4>
<p><span style="font-family: georgia, palatino;">Use the following command to run Apache:</span></p>
<p><span style="color: #0000ff;"><span style="font-family: georgia, palatino;">sudo /usr/sbin/apache2ctl start</span></span></p>
<p><span style="font-family: georgia, palatino;">To stop it, use:</span></p>
<p><span style="color: #0000ff;"><span style="font-family: georgia, palatino;">sudo /usr/sbin/apache2ctl stop</span></span></p>
<p><span style="font-family: georgia, palatino;">To test configuration changes, use:</span></p>
<p><span style="color: #0000ff;"><span style="font-family: georgia, palatino;">sudo /usr/sbin/apache2ctl configtest</span></span></p>
<p><span style="font-family: georgia, palatino;">Finally, to restart it, run:</span></p>
<p><span style="color: #0000ff;"><span style="font-family: georgia, palatino;">sudo /usr/sbin/apache2ctl restart</span></span></p>
<p style="text-align: justify;"><strong><br />
</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.biogem.org/2009/11/installing-lamp-on-ubuntu-9-10.html/feed</wfw:commentRss>
		<slash:comments>31</slash:comments>
		</item>
	</channel>
</rss>
