Introduction

Laravel is a free, open source PHP web application framework, designed for the development of MVC web applications.

Requirements

1. Latest version of PHP,MySQL and Apache Web Server must be installed on your system.

2. You need to ensure that you have mod_rewrite enabled on your web server.

$ sudo a2enmod rewrite

3. Install the PHP JSON extension.

$ sudo apt-get install php5-json.

Steps:-

1. Download the latest version of laravel framework and extract its contents into a directory on your server. Don’t forget to give permissions to it.
2. Laravel utilizes Composer to manage its dependencies,we need to install Composer (again, this means downloading it into your project)

$ curl -sS https://getcomposer.org/installer | php

Note: If the above fails for some reason, you can download the installer with php instead.

$ php -r "readfile('https://getcomposer.org/installer');" | php

4. Next, run below given command to install all of the framework’s dependencies and the framework dependencies as mentioned in composer.json file.

$ php composer.phar install

Note : Run this command from the root of your application.

5. Lastly, we’ll need to setup a virtual host for Laravel. Add the domain, laravelapp.com, to our hosts files i.e /etc/hosts

127.0.0.1 laravelapp.com

Note: we are not buying an actual .com domain, but just making one at local installation.

This will inform our machine that the domain laravelapp.com will resolve to 127.0.0.1, which is the local computer.

6. In the Laravel files you should see a directory, called public, which is where all publically accessible files should go. In addition to that, we need to make sure that our domain, http://laravelapp.com only points to the public folder and nowhere else. Edit /etc/apache2/sites-available. Add following lines to it.
(i) Copy deafult file as a new file.

$ cp default laravel

(ii) Edit /etc/apache2/sites-available/laravel. Add below given lines to it.

<VirtualHost *:80>
ServerName laravelapp.com
DocumentRoot "/var/www/laravel-master/public"
<Directory "/var/www/laravel-master/public">
</Directory>

(iii) Run below given command after it.

$ sudo a2ensite laravel

7. Reload apache Server.

$ sudo service apache2 reload

8. Run http://laravelapp.com/ on your browser. It display “You have arrived”. That’s all.

Thanks.

I have recently listen presentation on Typography delivered by Inderpreet Singh. He delivered in such a way that he enforced audience to think upon every minute while reading or writting any material.

Typography is how to present written material in well manner. It is not about designing or decorating, it is about problem solving. Typograpghy is justfont, which change mood of readers. Every font say something, and every font has special meaning, just to recognize it which font where needed.
Most of the webpages filled with content in bad typography, that makes reader uncomfortable.

Typography change the look of material in such a way that reader kept on reading with interest. It is the heart of articles, blogs and webpages.

Before listening to this presenatation I have never think about Typography.
Now I came to know, how much Typograpghy matters.
Need to think how we can read books continuosly, specially novels.
Need to think that how small things made change from good to excellence.
Without typograpghy is just like forget to put maggie masala into maggie.

Mount media

# mount type mediadir

Arguments are

type : here define device path
media dir : In which directory you want to mount

example # mount /dev/sdb1 bagga

To unmount

sudo umount /dev/sdb1

Alternative of mount command is udisks

Mount media

udisks --mount /dev/path

Unmount media

udisks --unmount /dev/path

Take backup of your data.

Make tar file:

# tar -cvzf maketarfile.tar.gz ./*

To know about tar more, try “man tar” in your command window.

./* use to give path of directory of which you make tar file. 
. is current directory
/ current directory inside
* consider everything

Copy to USB media:

# cp -r maketarfile.tar.gz /media/media_name

Unmount media after copied tar files:

umount mount point
ex : unmount /dev/sdb1

Install Ubuntu Server

Get USB media either bootable CD or pendrive of Ubuntu Server.
Insert USB in USB port.
Press favourable function key to enter boot menu.
Language setting : English US
Detect keyboard layout : NO, in our case. 
Keyboar layout setting : US

After loading additional components
hostname- Define hostname example abc.local
Creating manual partitions :
delete primary and logical partitions if exist.

  • create a new partition for home
  • Mount point /home
  • create a new partition for var 
  • Mount point /var
  • create a new partition for boot
  • Mount point /boot
  • Create a new partition for root
  • Mount point /

Done with disk patitioning.

Manage upgrades:
Softare Default Install Server
Install SSH Server
Install the GRUB boot loader to the master boot record

Finish Installation

Network Configuration for static IP

Open the /etc/network/interfaces file. I have used vi, but you can choose a different editor.

# vi /etc/network/interfaces

auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.1

you can customize this to your network.

Set DNS nameserver either Open DNS and Google DNS:

Open DNS
208.67.222.222
208.67.220.220
Google DNS
8.8.8.8
4.4.4.4

# vim /etc/resolv.conf
nameserver xxx.xxx.xxx.xxx

Now you will just need to restart the networking components

# /etc/init.d/networking restart

Reboot you system

# sudo reboot

Before training, I have planned going to chandigarh for my 6 moths training. I wanted to work in an IT Company and side apart an IELTS Course. I have tried to find an IT Company, but unfortunately I did not have any relations with an IT Person. As my Training application submit date had come closer, I asked my friends where they would be joining. One of my friend Jaspreet Kaur Sarao replied and suggested me to join training in college campus, under Dr. H.S.Rai Dean of Testing & Consultancy Cell, Guru Nanak Dev Engineering College. Many questions were arising in my mind, as which language would be taught there?, On which technology we will work? Jaspreet answered all my questions. She told about her 6 weeks training. That she worked on open source Softwares and Linux. IT companies used windows or proprietry softwares, which is not good. She also gave example of old Trainee under Dr. H.S.Rai, is Parveen Arora. Who have selected in GSOC. Then I made up my mind to get trained under Dr. H.S.Rai, with hope of my best output. I have experienced various technical lectures on some language in my 6 weeks training are HTML, CSS, JavaScript,Ajax, PHP, MySQL learned from outside in an Institute. This was the only teaching method I knew.

At the time of Training, apart from my projects, which I experienced is not less then any IT company or a dream workplace. The best thing is “Environment”. Trainees shared their experience, ideas, problems on mailing list. Training has not based on any language, it has based on project-oriented approach or problem-oriented approach. The working technique has to get project and understand requirements. On the basis of requirements, learning process has begin. Searching on Internet is a first choice, and which made me feel independent. Tools and Techniques are practiced well from internet. The main part is code, which requires language, is choice to chose by self. Rule to use Open Source. I am Working on a linux Operating system and useing FOSS. I learned to manage code on github. Work is properly documented and blogged. Write daily diary during Training time which made me worked. I am updated with the new technology by attending seminars and Discussions on mailing list. I rely on Open Source, want to work with an Open Source organization, participate in GSOC.

After Training, I felt change in me, I no more need any institute to work on. I am self motivated. This change is only made because of my mentor Dr. H.S.Rai, which spend their valuable time on us. I always wish to remain his student for my lifetime. The most important thing is now I have learned how to work, how to solve my problems.

Requirements

Install LDAP
Install WordPress from 2.2 to 3.4 version

Steps

1. Create Users and Groups in LDAP.
2. Install wpDirAuth plugin in WordPress.
3. Configure wpDirAuth plugin. Steps to do this.
(i) Go to Directory Auth from settings menu.
(ii) Enable Directory Authentication to Yes if you want that WordPress authenticate LDAP users.
(iii) Requires SSL Login to Yes if you want WordPress login to do encryption.
(iv) Directory servers(Domain Controllers) means DNS or IP address. In my case I installed LDAP on my local server that is localhost.
(v) Account Filter means attribute of LDAP which authenticates WordPress login. In my case I chose cn(common name).
(vi) Base DN(distinguish name) contains the name of LDAP group of users you used to register in WordPress. In my case I have given ou=people,dc=navdeep,dc=bagga. Where ou=people is LDAP group of users.
(vii) Bind DN value contain admin of LDAP. Below given command displays the admin of your LDAP.

$ ldapsearch -x -b dc=debuntu,dc=local

In my case it is cn=admin,dc=navdeep,dc=bagga

(viii) Bind Password is a password of LDAP.

4. Save your settings by clicking on Update Options.
5. Go to Users menu and Click on ‘Add Directory Authenticated User’.
6. To register your LDAP user in WordPress, give filter attribute value in SSOID field which you have given in Account filter at the time you have configured plugin.In my case I have given name neha which is the value of cn in my LDAP. Define your role which you want to give to that member. Click on Add New User.
7. Open your login window in WordPress. Give ldap Username and password which you have registered in WordPress(step 6).

Before configure gateway first install kannel

Configuration of gateway can be divided into two parts.

Bearerbox : bearerbox is a gateway, interface towards the phones. Its work is to keeping an eye on the gateway while it is running and use http interface to control the gateway.

smsbox : It handles sms gateway functionality. It contain sms-services, sendsms-user group which helps sms center to build.

sqlbox : (optional) sqlbox is used for DLR(delivery report) storage. Use to store logs of incoming and outgoing SMS in database.

Purpose of Using kannel : To send and receive sms for your application.

Requirements : GSM phone or modem (link to compatible.shtml)

Attach your phone or modem to the computer through USB cable.

Enter the following command in your terminal.

$ wvdialconf
 Note : run command with sudo user

If it display : No modem was detected.

Then your phone is not compatible with kannel.

If it display : Found an USB modem.

Then your phone is compatible with kannel.

Your connected device configuration written to /etc/wvdial.conf

Open wvdial.conf file in your favourite editor.

$ vim /etc/wvdial.conf

Value of Init1 ,Init2, Modem Type, Modem use in gateway configuration

Lets write configuration file for kannel.

Edit kannel.conf file on your desktop or anywhere you want in your file system.

core group is used for general bearerbox configuration. dlr-storage value is depend on which DBMS is used.

group = core
 admin-port = 13003
 admin-password =
 admin-allow-ip = "127.0.0.1"
 dlr-storage = mysql //where to store the logs of sms
 smsbox-port = 13016
 log-file = "/var/log/kannel/bearerbox.log"
 access-log = "/var/log/kannel/access.log"
 box-allow-ip = "127.0.0.1"
 log-level = 0

smsc group include all variables which used to set SMS center in kannel. smsc-id value is name of device which is connected. modemtype and device change according to Modem value in wvdial.conf file

group = smsc
 smsc-id = Nokia
 smsc = at
 modemtype = USB Modem
 device= /dev/ttyACM0
 my-number = +919888888887
 connect-allow-ip = 127.0.0.1
 sim-buffering = false
 log-level = 0

mysql-connection group is used when mysql database is used to store data values. database,username,password variables values are database name,database username and password respectively.

group = mysql-connection
 id = mydlr
 host = localhost
 username = boot
 password = abc
 database = key
group = dlr-db
 id = mydlr
 table = dlr
 field-smsc = smsc
 field-timestamp = ts
 field-source=source
 field-destination = destination
 field-service = service
 field-url = url
 field-mask = mask
 field-status = status
 field-boxc-id = boxc

Modem group is used to define Modem configuration. init- string variable value change according to Init value in wvdial.conf file

group = modems
 id = Nokia
 name = Nokia
 detect-string = "Nokia"
 init-string = "ATZ"
 init-string = "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
 message-storage = SM
 message-start = 0

smsbox group must define to use SMS Kannel

group = smsbox
 smsbox-id = mysmsbox
 bearerbox-host = localhost //hostname
 bearerbox-port = 13020
 sendsms-port = 13013
 global-sender = +919888888887 //your modem number
 access-log = "/var/log/kannel/smsbox-access.log"
 log-file = "/var/log/kannel/smsbox.log"
 log-level = 0
 mo-recode = true

smsbox route group is develop an interface between smsbox and bearerbox.

group = smsbox-route
 smsbox-id = mysmsbox
 smsc-id = Nokia

sendsms-user group is used to push SMS through browser. Variables username and password are used for authentication purpose.

group = sendsms-user
 username =
 password =
 concatenation= true
 max-messages = 10000

sms-service group is provide services to incoming SMS. Accepted-smsc variable means which SMS center used to accept as incoming SMS.

group = sms-service
 keyword-regex = .*
 catch-all = true
 accepted-smsc = Nokia
 max-messages = 99
 get-url = "http://localhost/api/sms.php?phone=%p&text=%a"

Edit sqlbox.conf file where your kannel.conf file is placed.

sqlbox group used to tell kannel about sms log table and insert table. The sql-insert-table is used to store SMS which we want to send and sql-log-table is show logs of sms which are send through kannel and log of delivery reports.

group = sqlbox
id = sqlbox-db
global-sender = "+919888888887"
bearerbox-host = localhost
bearerbox-port = 13016
smsbox-port = 13020
smsbox-port-ssl = false
sql-log-table = sent_sms
sql-insert-table = send_sms
log-file = "/var/log/kannel/kannel-sqlbox.log"
log-level = 0

mysql-connection group explained before

group = mysql-connection
id = sqlbox-db
host = localhost
username = boot
password = abc
database = key

Lets send SMS through kannel through http(browser) and application. Excited ;)

Start kannel service: Run these commands on seperate Terminals sequentially with sudo user.

$ bearerbox -v 1 kannel.conf
$ sqlbox -v 1 sqlbox.conf
$ smsbox -v 1 kannel.conf

Set verbosity level
0 is ‘debug’.
1 is ‘info.
2 ‘warning’.
3 ‘error’.
4 ‘panic’.

Send SMS through browser : Open your favorite browser and type below given on address bar.

http://localhost:13003/cgi-bin/sendsms?username=&password=&to=0123456&text=Hello+world

13001 is an admin-port number which is defined in core group.
username and password value which is define in sendsms-user group.
to value contain phone number to whom we want to send SMS.
text value contain content of SMS.

Send SMS through application : To send through application is just do one entry in send_sms table of defined database in config files.

Method : Write sql query which insert sender, receive number and message data in send_sms table. kannel automatically check send_sms table and send SMS.

sql code of tables

sent_sms

send_sms

All the Best!

Now Kannel can send and recieve messages
Problem : When I run bearerbox. It gives Generic error: ERROR
Solution : In kannel.conf file

By default sim-buffering = true
I change to this
sim-buffering = false

I get hint from Alvaro Cornejo reply on kannel mailing list.

RE: As you can see; it seems that your modem does not support SM (SIM) storage. Try defining equipment storage “EM” as yoru store. Check guide for details.

I help my friends Jaspreet Sarao, Damanpreet in mysql.
Jaspreet problem is in while loop of query.
Daman problem is how to get know about table is empty or not.
I suggest to use count function.

Outreach Program For Women

I want to participate in this internship program.

Process of program:
(i) Contribute any one organization in project.
(ii) Write application, give detail of done project and resume.
Submission date is 3 december.
(iii) Selected students are going for internship.

I am interested in these organizations and related projects.
1. OpenITP

(i) Integration between dokuwiki and etherpad-lite : pad-like interface for simultaneous multi-person DokuWiki editing that respects ACLs, can handle SSL.
(ii) UX designer at large : UX design task for a free software anti-censorship or anti-surveillance project

2. Deltacloud

(i) Improve deltacloud website : Improve site navigation, styling and documentation of Deltacloud in HTML, CSS

3. Wikimedia

(i) Write extension for pulling files from git repository : Write an extension that would accomplish most of the features offered by large pastebin websites, with the added bonus of being able to add code to a wiki page without copying and pasting.
(ii) Create an extention of mediawiki : Creating extensions to MediaWiki is a great way to make it better. It contributes something new and cool to the community, and the Wikimedia sites (including Wikipedia!) might even decide to deploy your software, if it’s really neat.

 

My 7210 Nokia phone finally connected with kannel.
It show status OK.
But not sending messages.

Now every phone present in my home connect with kannel.
Why kannel website provide wrong information(http://www.kannel.org/compatibility.shtml).

When I attach my Nokia 7210 phone to kannel and start bearerbox

bearerbox -v 1 kannel.conf

2012-11-18 21:32:58 [5100] [0] INFO: Debug_lvl = 1, log_file = <none>,
log_lvl = 0
2012-11-18 21:32:58 [5100] [0] INFO: MYSQL: Connected to server at localhost.
2012-11-18 21:32:58 [5100] [0] INFO: MYSQL: server version
5.5.28-0ubuntu0.12.04.2, client version 5.5.28.
2012-11-18 21:32:58 [5100] [0] INFO: DLR using storage type: mysql
2012-11-18 21:32:58 [5100] [0] ERROR: Couldn’t open logfile
`/var/log/kannel/bearerbox.log’.
2012-11-18 21:32:58 [5100] [0] ERROR: System error 2: No such file or directory
2012-11-18 21:32:58 [5100] [0] ERROR: Couldn’t open logfile
`/var/log/kannel/access.log’.
2012-11-18 21:32:58 [5100] [0] ERROR: System error 2: No such file or directory
2012-11-18 21:32:58 [5100] [0] INFO: SSL not supported, no SSL
initialization done.
2012-11-18 21:32:58 [5100] [0] INFO: HTTP: Opening server at port 13015.
2012-11-18 21:32:58 [5100] [0] INFO: BOXC: ‘smsbox-max-pending’ not
set, using default (100).
2012-11-18 21:32:58 [5100] [0] INFO: Set SMS resend frequency to 60 seconds.
2012-11-18 21:32:58 [5100] [0] INFO: SMS resend retry set to unlimited.
2012-11-18 21:32:58 [5100] [0] INFO: DLR rerouting for smsc id <Nokia> disabled.
2012-11-18 21:32:58 [5100] [0] INFO: AT2[Nokia]: configuration shows
modemtype <USB Modem>
2012-11-18 21:32:58 [5100] [0] INFO: AT2[Nokia]: modemtype not found,
revert to autodetect
2012-11-18 21:32:58 [5100] [0] INFO: —————————————-
2012-11-18 21:32:58 [5100] [0] INFO: Kannel bearerbox II version 1.5.0 starting
2012-11-18 21:32:58 [5100] [6] INFO: AT2[Nokia]: opening device
2012-11-18 21:32:58 [5100] [0] INFO: MAIN: Start-up done, entering mainloop
2012-11-18 21:32:59 [5100] [6] INFO: AT2[Nokia]: speed set to 115200
2012-11-18 21:33:01 [5100] [6] INFO: AT2[Nokia]: Closing device
2012-11-18 21:33:01 [5100] [6] INFO: AT2[Nokia]: detect speed is 115200
2012-11-18 21:33:01 [5100] [6] INFO: AT2[Nokia]: opening device
2012-11-18 21:33:02 [5100] [6] INFO: AT2[Nokia]: speed set to 115200
2012-11-18 21:33:05 [5100] [6] INFO: AT2[Nokia]: Closing device
2012-11-18 21:33:05 [5100] [6] INFO: AT2[Nokia]: opening device
2012-11-18 21:33:05 [5100] [6] INFO: AT2[Nokia]: Logging in
2012-11-18 21:33:05 [5100] [6] INFO: AT2[Nokia]: init device
2012-11-18 21:33:05 [5100] [6] INFO: AT2[Nokia]: speed set to 115200
2012-11-18 21:33:07 [5100] [6] INFO: AT2[Nokia]: AT SMSC successfully opened.
2012-11-18 21:33:07 [5100] [6] ERROR: AT2[Nokia]: Generic error: ERROR
It gives following error
Generic error: ERROR

Andreas Fink on kannel mailing list reply my mail
RE: Run it with debug level = 0 to see the AT comand.

Then I run bearerbox with this command
bearerbox -v 0 kannel.conf

But unable to find the problem