How to install PostgreSQL on CentOS Linux?

First lets do an update before we start installing PostgreSQL

$ yum update

You can install PostgreSQL from CentOS Base repo or can do a search for the latest version and install it based on your needs. Method 1 describes manual setup and Method 2 indicates an install from CentOS base repo Continue Reading…

Firefox: Responsive design testing for Mobile devices

Follow the below steps to set the preset value for responsive design testing on mobile devices

i) Go to the address bar in firefox and type “about.config

ii) You will get a warning message stating “This might void your warranty … Changing these advanced settings can be harmful to the stability …..”. Click the button “I’ll be careful, I promise!’

iii) In the search bar, type “presets” and look through the filter values for “devtools.responsiveUI.presets“. Double click on the preference name “devtools.responsiveUI.presets” and enter the values

[{“key”:”320×480″,”name”:”iPhone 3g/3gs”,”width”:320,”height”:480},{“key”:”360×640″,”name”:”Nokia E7, n90″,”width”:360,”height”:640},{“key”:”640×960″,”name”:”iPhone4/4s”,”width”:640,”height”:960},{“key”:”640×1136″,”name”:”iPhone5/5c/5s”,”width”:640,”height”:1136},{“key”:”768×1024″,”name”:”ipad1/2″,”width”:768,”height”:1024},{“key”:”800×480″,”name”:”Android-WVGA”,”width”:800,”height”:480},{“key”:”800×1280″,”name”:”KindleFireHD8.9″,”width”:800,”height”:1280},{“key”:”2048×1536″,”name”:”Retina display”,”width”:2048,”height”:1536},{“key”:”600×800″,”name”:”KindleFire/Galaxy/Nexus”,”width”:600,”height”:800}]

Once the values are entered, you can open a new instance of the browser and click ctrl + shift + m to open up the responsive web view

Responsive web page testing tools available online


Interesting site to test mobile web pages of various screen sizes (kindle fire, samsung galaxy tab, google nexus 7, apple ipad 1 – 3 mini, kindle fire HD,  motorola razr v3m, motorola razr v8, blackberry 8300, apple iphone 3 & 4, LG optimus S, Samsung galaxy S2, ASUS galaxy 7, apple iphone 5, samsung galaxy s3/s4)

Also this tool offers landscape and portrait modes in addition to scroll & retina effect.

StudiopressResponsive testing

Responsive test from

Another interesting tool available online to check web page responsiveness on mobile phones, tablets, laptops and desktops. The web tool has resolutions for testing categorized by devices Apple, Blackberry (Bold 9930, Q10, Torch 9810, Torch 9850, Z10), Samsung, HTC, LG

Other tools

Browser resizing –

Responsive pixel –

Demonstrating responsive design –

Refer Wikipedia for the display of devices by pixel density

How to setup, install Apache, PHP and MySQL on Mac OS?

Apache server is installed by default on Mac. Access the configuration settings for Apache by going to

$ cd /etc/apache2/
$ vi httpd.conf

To enable php, edit httpd.conf and uncomment the line
#LoadModule php5_module libexec/apache2/

Uncomment other lines that you may want to load in your system. As you are enabling PHP in your system, you may want to change the DirectoryIndex to
DirectoryIndex index.php index.html

Default group/user settings inside Apache on Mac is _www:_www
Continue Reading…

Linux message: Partition 1 does not end on cylinder boundary

$ fdisk -l /dev/sda

Device Boot Start End Blocks Id System

/dev/sda1 * 1 128 1024000 83 Linux
Partition 1 does not end on cylinder boundary.

/dev/sda2 128 383 2048000 83 Linux
Partition 2 does not end on cylinder boundary.

This is not a problem and is commonly seen in new systems. Continue Reading…

MySQL Error #1449 – The user specified as a definer does not exist in database

The reason why this message is shown is because the user for the view does not exist in the database.

There are few ways by which we can remove this error

i) Alter statement

ii) Create the specified user in the database

iii) Modify the .frm files related to the view and set the definer

We will show the Alter statement method to achieve the desired results

# To fix it:

mysql> ALTER DEFINER = ‘root’@’localhost’ VIEW `mytableview` AS select * from cities;

mysql> SELECT * FROM mytableview;

Sometimes it so happens that the view statement will be a big selection of fields with joins in it. Export the table first to get the required SELECT statement for the view and then change the DEFINER


Linux: How the password is stored, salted and hashed securely?

In earlier systems, passwords were stored in the file /etc/passwd and they were not encrypted.

After the user is created, an entry gets recorded in /etc/passwd with ‘x’ in the second column instead of the acutal password.

$ useradd timmy

$ cat /etc/passwd

For security reasons, passwords are now stored in the file /etc/shadow and they are encrypted. Password was not set initially, when the user was created. This is indicated by !! mark (in RedHat, ! – Debian)

$ cat /etc/shadow


Continue Reading…

How to fix Hibernate MySql connection timeout issue (solved)?

When we began creating an application using Struts2 framework with Hibernate and MySQL, we ran into a problem which was related to MySQL timing out its connection after a span of 8 hours when left unused. It conceived a lot of time at our end but we were able to nail down the issue at the end.

Steps that we had taken to correct the issue related to Hibernate MySql connection timeout problem are listed below

– Download Hibernate C3P0 and copy .jar files
– Set
– Make changes to hibernate.cfg.xml
– Test MySQL connection timeout
– Hibernate, MySQL connection timeout related error messages
Continue Reading…

PEAR setup in WAMP in simple steps

* After WAMP is installed go to the folder where the web server related PHP bin directory is present. Search for the batch file pear.bat in it. Double click the file to start the PEAR installation. Go with the defaults and complete the installation

* Search for PEAR_ENV.reg. Double click that file to register the PEAR settings as environment variable

* Go to the command prompt and type “pear list” to see what packages are installed and if PEAR is correctly installed. If PEAR cannot be accessed via the command line, it means the PATH setting is not set correctly. Environment PATH variable should include the path to where pear.bat is present

How to install PHPSECLIB on a WAMP environment with PEAR setup?

PEAR should be already installed in the system before configuring the phpseclib channel.

PHPSecLib installation is very simple.

PHPSecLib is a library of optional PHP extensions which comes in handy if the application were to be packaged as a solution for deployment to the end user.

Step 1: Register the channel

c:\> pear channel-discover
Continue Reading…

Kurinchi Calendar
September 2018
« Oct