28 May 2012

It is web server software notable for playing a key role in the initial growth of the World Wide Web .
Apache is open-source software.
The application is available for a wide variety of operating systems, including Unix, Linux, Mac OS X and Microsoft Windows.

A Server is a computer or device on a network that manages network resources.
For example, a file server is a computer and storage device dedicated to storing files
Any user on the network can store files on the server.
A print server is a computer that manages one or more printers and a network server is a computer that manages network traffic.

Restart APACHE
sudo /etc/init.d/apache2 restart

Rewrite engine APACHE
Sudo a2enmod rewrite

Virtual hosting                                                                                                                           Virtual hosting is a method for hosting multiple domain names on a single server.
This allows one server to share its resources, such as memory and processor cycles,
without requiring all services provided to use the same host name.
The term virtual hosting is usually used in reference to web servers
but the principles carry over to other internet services. 

I practise on this and experience is post on blog.

Make Certificate with odtphp


OdtPHP is an oriented object libary for PHP 5+. It allows you to generate automatically OpenOffice text documents from templates. You can use it directly within your PHP scripts (without OpenOffice).
OdtPHP is very easy to use : with a minimum of code, you will be able to generate simple documents by replacing tags from template and by inserting some images. You can also take advantage from advanced features in order to create complex OpenOffice files by repeating parts of the document or lines of array.
OdtPHP allows you to replace tags from your OpenOffice template by text content or pictures. The library also handles loops that can be imbricated as you want. Moreover, odtPHP allows you to simply repeat lines of OpenOffice tables. Eventually, you can export the final result in a file on your server or directly to the client browser.

1. Linux Operating System
1. Apache Web Server
2. MySql
3. PHP
3. Download odtphp-1.0.1.zip link http://sourceforge.net/projects/odtphp/files/


1. Unzip odtphp package

#tar xvzf odtphp-1.0.1.zip

2. Place folder in /var/www file directory.

 #cd /var/www/odtphp-1.0.1

3. Move to test directory and create certificate.php file.

 #vim /tests/certificate.php

4. Include Library file


5. Include Template file in which form certificate produce.

 $odf = new odf("certificate.odt");

6. Database connectivity, give database details from which you want to get information.

 $dbConnection = mysql_connect("localhost", "dbUser", "dbpass");
 mysql_select_db("dbName", $dbConnection);

7. Create a segment.

 $article = $odf->setSegment('articles');

8. In articles, use sql query to fetch data and define segment variable and assign data value to it.

For Example:

$result = mysql_query("SELECT * FROM lime_survey_65311");
while($row = mysql_fetch_array($result))
 $pic = "images/" . $row['image'];
 $article->setImage('pic', $pic);
 $nameResult = $row['65311X7X12'];
 $nameRow = mysql_fetch_array(mysql_query("select answer from bongo_answers where code='$nameResult'"));
 $article->nameArticle($nameRow['answer']." ".$row['65311X7X13B1'] ." ". $row['65311X7X13B2'] ." ". $row['65311X7X13B3']);
 $deptResult = $row['65311X7X17'];
 $deptRow = mysql_fetch_array(mysql_query("select answer from bongo_answers where code='$deptResult'"));
9. Export as attached file.

10.Create a template file. In which you create your own design and define variables which you were define in your segment.

Second Week of Training


I want to share experience of kannel.
requirements of kannel are
gnome-xml,libxml2,libxml2-dev, build-essential, GNU Make, bison and autoconf.
some of these are installed by doing sudo apt-get insatll <package> in console mode.
Installation of kannel is followed from kannel.org
I read full documnentation and forward step by step.
but when i complete kannel installation steps and try to connect phone
I use two types of phone to connect one is nokia 7210 and samsung waveII
ERROR: modem error , kannel is unable to connect with both modems.
Then one of my teacher Mr. Harbhag Singh Sohal ask me to install kannel with sqlbox.
after then error is occured.
ERROR: gwlib is required.
after lot of search not found any solution.
Then i again install kannel one more time.
Again same problem gwlib is required.
Then i decide to install kannel in virtual box.
After sometime I came to know in virtual box , not able to connect phone modem.
Then i again install kannel.
This time problem is solved of gwlib by installing its package.
After then when i try to attach phone modem it given same problem
modem is not detected
Then i take modem of someone else for the time being.
when i attached and run kannel.
To send message from kannel we need three services to run.
when i run bearerbox it detects modem and sqlbox,smsbox run formally then i try to send message ,message is sent but not received.
and bearerbox reply that message packet lost.
then i try to install kannel on my friend’s desktop.
It gives same problem.
Then i decide to take break.


Task is to create a certificate via odtPHP.
In this two files are manged .odt and .php
.odt is for design
.php is for programming.
Its requirements are:
The Certificate module creates PDF certificates/diplomas for students of the course and is completely customizable. You can add borders, watermarks, seals and even show grade information.

odtPHP is able to create PDF and by using php we can completely customize certificate and borders are easily added from libre office writer and watermark for certificate is designed in gimp.
many problems occured during odt content setting.
database is used for retreiving certificate information.
LIME SURVEY is used to get enteries in database from certificate holders.
After all doing this main prob of image display on certificate.
follow various resize, crop techniques but this step cause rejection of certificate.

During this time i demotivate.But I learn so many things during this period
Learn various new commands, working in console mode.
I found good things in me.
and I know who try never fails.

I am helping one of my friend rimpy in his lime survey to display google map.
As interest I done some work on drupal and wordpress to dispaly drop down menus by using mega menu and installing modules.

My First Week of Training

I solved my WIFI Problem
1. Enable wifi in a BIOS settings.
2. To display wireless information I use the following command
$ rfkill list all
when i run this command my wifi is hard blocked.
3. To enable I use ‘$ rfkill unblock all’ command.
4. After this according to my lenovo laptop fn+f5 key start the wifi service.

1.First thing I came to know that when we specify home folder in console mode.
It should be with “~” sign.
For ex: $ cp ~/Desktop/dailydiary ~/Desktop/UntitledFolder/
It moves dailydiary file in UntitledFolder.

2.To execute hidden files means shell script files.
We need to place “.” in front of file.
For ex: $ cd .local/

3.To see permissions of file.We use this command
For ex: $ ls -l readme.txt
and also if we want to see hidden files.Use ls -a.

4.To extract the Zipped folder use
For ex: $ tar xvzf node.tar.gz

5.modprobe is the command which is opposite to rmmod
rmmod :Used to remove the module.
modprobe :to rebuilt the module.

6.To check the connection of hardware modules.Use rfkill command
For ex: $ rfkill list all

7.A command for displaying information about all PCI buses in the system and all devices connected to them is lspci. lspci is useful when you want to diagnose problems or when you want to report bugs related to pci devices.

8.A command to change the owner of file.
For ex: $ chown user file.txt
Give permissions as owner to user deep for the file file.txt.

9.make command:GNU make utility to maintain groups of programs.The purpose of the make utility is to determine automatically which pieces of a large program need to be recompiled, and issue the commands to recompile them.

10. make install:It is used to install the program. When doing this you must be root. Now when you’re root, you can install the program with the make install command.The program was installed in it’s /usr/local/bin.
For ex: root@meow: /home/me/dls/pkg# make install

11.To Download file from internet.Use the following command
For ex: $ wget [file source link]

My Teacher Dr. H.S.Rai assigned the project to me.
Project Definition: The web frontend of GNDEC SMS Service (http://gndec.ac.in/sms) is written in pure PHP and porting it to some MVC based framework choices are Django, Ruby-On Rails,Codeigniter, Zend framework
Then i choose Zend Framework because I itself made simple project in this and also is also a good option for php based projects because it itself written in php.
To develop an API.
To make Zend to work with LDAP.

API : An application programming interface is a specification intended to be used as an interface by software components to communicate with each other.An API can also be an implementation of a protocol.In general the difference between an API and a protocol is that the protocol defines a standard way to exchange requests and responses based on a common transport and agreeing on a data/message exchange format, while an API (not implementing a protocol) is usually implemented as a library to be used directly: hence there can be no transport involved (no information physically transferred from/to some remote machine), but rather only simple information exchange via function calls (local to the machine where the elaboration takes place) and data is exchanged in formats expressed in a specific language.

Then I try Google Map API to get the basic knowledge.Following are some steps which i followed to get API key and display Google Map on browser.
1. Visit the API Console at https://code.google.com/apis/console and log in with your Google Account.
2. Click the Services link from the left-hand menu.
3. Activate the Google Maps API v3 service by clicking on ON button.
4. Accept terms and conditions.
5. Click the API Access link from the left-hand menu.
6. Your key is display under simple API Acess heading.
After getting the API key. Insert into the code and set it true(small letters).

<script type="text/javascript"

For furthur Reference:

Some Related Terms
KANNEL: Kannel is a compact and very powerful open source WAP and SMS gateway,WAP is used for Push service indications and mobile Internet connectivity.

WAP: Wireless Application Protocol is a technical standard for accessing information over a mobile wireless network. A WAP browser is a web browser for mobile devices such as mobile phones that uses the protocol.
WAP Push allow WAP content to be pushed to the mobile handset with minimum user intervention.A WAP Push is basically a specially encoded message which includes a link to a WAP or WWW address.On receiving a WAP Push, a WAP enabled handset will automatically give the user the option to access the WAP content.
When we run Kannel on system.WAP Push is specified WDP (WAP Datagram Protocol) resembled the UDP protocol in the Internet.As such it can be
delivered over any WDP-supported bearer, such as GPRS or SMS.WAP means a protocol that are used to connect wireless GPRS OR GSM with web browser by sending encoded message to mobile. by this web browser get the information of mobile device and start sending messages or emails through network.

CURL: It is used to transfer a URL to a server using one of the protocols.It is command line tool.The command is used to work without using user interaction.It offers Proxy, FTP Upload,HTTP Post.

Installing Etherpad-Lite