Menu bars

Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Sunday, 25 October 2015

Issues after live

25 Oct 2015

This made me tensed, suddenly the site went down and i was shocked. Tried to do everything then finally found this this discursion in the drupal site. Problem was with database disconnected. So restarted the service and everything started working.

26 Oct 2015

Wanted to redirect to same page after login and got help from this page. and worked perfect !

Monday, 19 October 2015

Digital Ocean Server admin basics

It is always essentials to get all the basics of the server admin if you are going to host a website by your own. Great !! Lets start with the very basics.

What i am going to use as a host service is digital ocean which will provide you VPS in a cloud style that is pay whatever you use. But after i create my cloud instance how can i access the remote server ? Yeah SSH (Secure shell) !!

This video is a very quick introduction to what is SSH ?


This one shows how to setup a ssh server


Now lets go in the digital ocean way itself, I have found many articles in the digital ocean to how to manage the server.
  • After creating a droplet in the digital ocean we need to connect to that droplet via SSH, this article tell you how to do that.
  • Now we want to see how the server has to configure for the SSH, You can check out this wonderful tutorial for getting an overview of what is happening.
Here is the command that i have used.

From server to local 

rsync -azP User@X.X.X.X:/var/www/html/drupal/sites /var/www/html

From local to server

rsync -azP /var/www/html/sites  User@X.X.X.X:/var/www/html/drupal



But this video is simple and elegant, it shows that how to create a public-private keys and how to connect to your remote server.Awesome !!



And finally we need to make the site online, here is the details for initial setup to be followed in digital ocean.


GUI to manage the server

After few searches in the internet came to know about webadmin one of the GUI based application for managing the server. So that it will give easy access to each and everything and we need not do all the file edit from the server.Here is the tutorial tells you how you will do it.



Oh You have not done yet !! want to add a domain name to the droplet that we have created ? So simple in digital ocean - Refer this tutorial to do that


FIle permissions

You might come across the permission problems in the system. Here is the stack answer deals with that in detail



Friday, 16 October 2015

Drupal 7 issues that i have faced and how did i solved it !!

Sept 28 2015

  • Wanted to automatically upload the image when it chose from computer
Solved it by using the module AutoUpload - Here is the link  

  • Want to use custom view for node/add/form for authenticated users.
After a bit of research landed on this link and worked like a charm

Sept 29 2015


  • Remove the messages after few seconds in my site
A simple javascript trick will do it for you - here

  • Use different page layouts for different urls 
After a few searches and a hour of trying out various option landed in here

Oct 12 2015

Stumbled upon the problem with migration of my site. I have taken the sql dumb and tried to load it into the new server. but i had some problem with cache, it was taking the older site path and i posted a question in the stackoverflow for drupal and got the answer that i have to change the values in registry and registry_table tables. You can find the question here .


Oct 16 2015


Faced a very annoying problem with ajax comments. It was showing "A parsing or network error has occurred." when i was trying to click on any of the poll actions. Checked this answer in drupal.org and started checking the developer console in the chrome and came to know about the php error "E_CORE_WARNING Error in file  Unknown  at line 0: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20121212/msql.so' - /usr/lib/php5/20121212/msql.so: cannot open shared object file: No such file or directory drupal"

Checked this answer in stack overflow after that and commented the extesnion in the php.ini file in the apache2.


Oct 19 2015

I was in the last phase of migrating my application and i have came across that the update script is not running properly and it is stopping in between the "pending updates" and the updates were not running. After a day i have came across the this answer from the stack exchange. I thought of trying this out by changing the corresponding updates in the database manually. after that everything worked perfectly. Great start for the day.




Sunday, 11 October 2015

Migrate a drupal site from localhost to server

Here is a wonderful video tutorial from scott from level of tuts - See here

But may be sometime you need to change the size of the file that can be uploaded to the website and that you can change by tweaking the php.ini file. The detailed steps to follow is here


  • If you want to change file upload size then go for this
  • Migrating common problem, worth reading. Awesome guidelines, Must read - This one

Monday, 14 September 2015

Deploy multiple sites in a single drupal core

This will be a need when you are planning to develop multiple drupal websites to be hosted on a single server. Lets dive in and understand how things works and what all are the available resources that are available for the time being to help with this particular problem.

This article from digital ocean tells us how multisite can be hosted in the server.

This article from drupal site itself tells us how to do it in a local machine.

I actually followed the instruction from




And everything worked as expected. !!!

Tuesday, 1 September 2015

Cons of Sony Xperia Z2

Everyone will be talking about the pros of the phone, lets go ahead and explore what all are the cons of the same.

Click for more details



    Click for more details

    Tuesday, 25 August 2015

    Platform overview : Lets get started with Drupal 7 in Ubuntu

    Apache2

    Apache is the most popular web server on the internet. It is used to serve more than half of all active websites.
    Although there are many viable web servers that will serve your content, it is helpful to understand how Apache works because of its ubiquity.
    In this article, we will examine some general configuration files and options that can be controlled within them. This article will follow the Ubuntu/Debian layout of Apache files, which is different from how other distributions build the configuration hierarchy.
    Here is a wonderful article about Apache2 in digital ocean - Read more

    Drupal directory
    It was little difficult for me to find out where is the drupal base directory in ubuntu, while installing theme and modules we need to access to these directories. This post help me to locate where it is.




    Saturday, 22 August 2015

    Resize HD partitions in ubuntu

    Partitioning the hard disk is always an difficult task even those guys who are frequently dealing with computer especially when you in linux flavors. Here comest most friendly free software available in the ubuntu repository , gparted  for help.  Install gparted with the command

    sudo apt-get install gparted
    When you open gparted from your system, you will get the following screen.

    Here you can see that all your partitions and corresponding file-system and all other details are given. And if you observe little more you will get confused with the logical and extended partition concept of the partitioning. The real pain comes when you realize that you can create only 4 primary partitions and if you try to create another one they wont allow you. Here we have to delete any of the partition and resize it.

    When i was facing this problem this forum helped me out !!


    • The key sign near the FS wont allow us to do any of the operation on that FS, since this is in use right now.
    • If there is key sign on the linux-swap then you can choose swap-off and do the operation.
    • try to make changes to extended partition only, so that you can add many partitions here

    • EXT4 partitions means  Linux FileSystem
    • NTFS partitions means Windows Filesystem
    If you want to resize the already booting FS then use a bootable usb and use gparted to change everything.

    Friday, 21 August 2015

    Create a github repo

    Lets create a github repo. so that we can store all our code safe in the repository and share the same across.



    See the first step :  (+) sign on top of right side.




    Lets continue....



    The repository url will be looks like this: 


    after the last step it will ask your github username and password. username will be email id normally

    and you will get this message at the end



    Now you can check the repository created in your account.


    Clone a repository

    If you wanted to clone the same repo somewhere else then you can follow the following step.

    git clone <repo url>

    Using git

    This is a good resource to look into the git command - the link 

    git status
    git add <file>
    git commit -m "msg"
    git push
    git pull







    Tuesday, 11 August 2015

    Scrapy - Get started !!

    Scrapy is a python module for web scraping. If you want to scrape data in the websites in a automated way then this is one of the best option available in the techno-space. writing a python script with scrapy will create a crawler and it will scrape the data from the web sites that you intended to scrap.

    Here i am listing few interesting links for setting and using the python scrapy !!
    • This is one of the starting place for scrapy, which explains the setup and usage - Check here
    • This is another wonderful article on scrapy !! Explains better - See here 
    • Most probably you will get confused with xPath selection, If you want to look into it in detail then Check this and this

    Use developer tools for xPath

    Go to the inspect element of the required field in Chrome developer tool and right click+copy xpath




    Right-click on the <tr> and copy the xpath and print it on the developer tool console to make sure that whether you got the correct xpath.

    Here you can see that the xpath has selected the entire <tr>. now we can easily scrape the data with the scrapy's methods.

    Ionic framework for mobile apps - Setup

    Hybrid applications are getting popular since we can use the same code for both android and ios applications. Hybrid apps will be written in web programming languages, so it will be no learning curve for a web developer. Otherwise the learning curve of android and ios are comparatively large.So if you have experience in web development hybrid apps are for you.


    When not to use Hybrid apps 

    If you are planning for a game or graphics intensive app then you will fee some lags in the hybrid apps, because these apps cannot make use of the platform very well. only native application can provide exact performance that is needed for games and memory intensive processes.

    When to use Hybrid apps

    If you are planning to make a network based application which is getting some information from server or some application which does not make much interaction with the internals of the device can be done perfectly with hybrid apps.

    Ionic Framework

    Ionic is a Angularjs powered hybrid mobile framework where you can make all kind of mobile applications easily with the help of angularjs. lets dive in and check how to install it.

    Follow this link to setup the ionic project

    But installing all these dependencies like node,android,ant etc will be kind of pain, but there is a wonderful bash script written by nraboy for ubuntu platform.

    Once you run the script follow the commands




























    ionic serve - for seeing in the browser
    This will launch the android emulator. The error that i have faced was
    rm: could not remove directory (code EACCES)
    This was happening because my ExampleProject directory does not had execute permission
    use this for assigning permissions recursively for sub directories.
    sudo chmod -R 755 /path/your/folder
    after this command everything started working properly.

    Useful links - How to Get the Ionic Framework Running on Ubuntu


                        - Building the Application

                        - Install android in ubuntu

                        - Test your app


    Hey..it is not over !! you might have got an error in the emulator like this




    This is caused because of the app time out. for solving this error i have followed this link and rebuilt my application and everything started working perfect !!

    Saving Data With IonicFramework

    Saving data in locally important for small amount of large data. So that even without a database like sqlite you can persist your data.

    Getting Started with ngCordova

    NgCordova will help to use all the device facilities like camera, locations etc







    Linux basics

    PATH

    It is a environment variable that is present for each user in a linux machine. while you install a linux os in a hardware admin will be having one PATH variable and each and every other user in the system will be having a PATH variable.


    http://bencane.com/2013/09/16/understanding-a-little-more-about-etcprofile-and-etcbashrc/

    Saturday, 8 August 2015

    Run windows 7 in a virtualbox from Ubuntu 14.04

    Step 1 : Open terminal and type,

    sudo apt-get install virtualbox 
    
    Virtualbox will get installed in 5 minutes.

    Step 2 : Open virtualbox and create a new virtual machine as you want. Easy steps to be followed and will land in this state



















    Step 3 : Right click on the virtual machine listed in the left panel and select settings which will land you in the following page.

    Click on storage

    Click on Empty

    Now you will see this page.












    Step 4 : Click on the cd-image on the right panel near CD/DVD


    Now choose a virtual CD/DVD file

    Choose your iso file

    Done !!

    Now go to your virtualbox and select the vm and click RUN