10/16/2013

Mysql clear screen

You may use the following command to clear screen on mysql command

system clear;


8/08/2013

Install javac on your centos server

The centos will install java automatically. But not for javac. So you have to install javac by yourself when you want to develop java program.

Now I give the step for install javac on Centos Server

1.  get java version installed on your machine

    java -version

   you will get  
 
    java version "1.7.0_25"
   OpenJDK Runtime Environment (rhel-2.3.10.4.el6_4-x86_64)
   OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)


2. install javac
    yum install java-1.7.0-openjdk-devel

3. check javac
     javac -version
 
     javac 1.7.0_25

   I hope it may assist you when you install java development package on your PC. 

7/10/2013

yum install xdebug + xdebug test example for php 5.4

Xdebug  is a nice tool for PHP development. The following is taken from official site:

Xdebug's basic functions include the display of stack traces on error conditions, maximum nesting level protection and time tracking.

There are many ways to install xdebug. Now I give one way to use yum for xdebug installment.

 sudo yum  install php-xdebug

or with enable remi repo

sudo yum --enablerepo=remi install php-xdebug

------------------------------------------------------example---------------------------------------------------------------
now let us test one example for xdebug

vi test.php


<?php 

echo $a;

$a++;

echo $a;
?>


>> php test.php

PHP Notice:  Undefined variable: a in /var/www/a.php on line 3
PHP Stack trace:
PHP   1. {main}() /var/www/a.php:0
PHP Notice:  Undefined variable: a in /var/www/a.php on line 5
PHP Stack trace:
PHP   1. {main}() /var/www/a.php:0