Thanks Valery Fremaux for sharing information.
Actually I activated the debug mode too. This time blank screen didn't appear but an error occured which I think should not occur.
My code of config.php is here:
$CFG->dbtype = 'mysqli';
$CFG->dblibrary = 'native';
$CFG->dbhost = 'localhost';
$CFG->dbname = 'moodle';
$CFG->dbuser = 'moodleuser';
$CFG->dbpass = '1234';
$CFG->prefix = 'mdl_';
$CFG->dboptions = array (
'dbpersist' => 0,
'dbport' => '',
'dbsocket' => '',
);
$CFG->wwwroot = 'http://localhost/moodle';
$CFG->dataroot = '/var/moodledata';
$CFG->admin = 'admin';
$CFG->directorypermissions = 0777; //setting permission to edit
//something in config.php
//<--------below lines are used for displaying errors when blank pages appears or simply when 'dubugging on' needed-->
require_once(dirname(__FILE__) . '/lib/setup.php');
ini_set ('display_errors', 'on');
ini_set ('log_errors', 'on');
ini_set ('display_startup_errors', 'on');
ini_set ('error_reporting', E_ALL);
//<------------------------------------
//displaying more debuging messages
$CFG-> debug = 6143;
$CFG->debugdisplay = 1;
//<-------------------------------------
AND THE ERROR THAT OCCURED IS:
Parse error: syntax error, unexpected T_PUBLIC in /var/www/moodle/blocks/teachersnparents/block_teachersnparents.php on line 8 //error generated
What else do need to change in above code??