School Management System Hosting

FIRST School management  system hosting worldwide, launch your own School mobile app in Google play store in $3 or INR 120 / 3 year per student.

Today, in this competitive world #KTCHost offering you unique School Management System plan under which you can avail following benefits in affordable price.

* Mobile & Desktop Based Portal
* Staff portal
* Student Portal
* Host Unlimited Staff Members and Students
* Host upto 1 Websites*
* Unlimited E-mail accounts
* 24×7 Unlimited support instance

For more information, you can E-mail at or Visit School Management System Hosting

#KTCHost – A Reliable Hosting Provider

OpenSSH Bug roaming connection feature

OpenSSH BUG: Client Information leak due to use of roaming connection feature

The OpenSSH client is supports an undocumented/unknown feature called roaming:

If connection to SSH server breaks/stucked unexpectedly,
and if server supports roaming, then client is able to reconnect to the server and resume the suspended SSH session.

Roaming feature on OpenSSH clients contain a security flaw which allows a malicious SSH server to steal the client’s private keys and its create OpenSSH bug.

To disable Roaming feature, refer following simple steps and secure your server.

To fix

Add the option ‘UseRoaming no’ in /etc/ssh/ssh_config file and restart ssh service with -oUseRoaming=no included on the ssh command line.

ie, echo ‘UseRoaming no’ >> /etc/ssh/ssh_config


sudo sh -c ‘echo UseRoaming \”no\” >> /etc/ssh/ssh_config’

It’s being reported that it effects only on Centos 7 servers and they can update OpenSSH using yum.

#yum update openssh

For more information read official Bug at Redhat Bugzilla

#KTCHost – A Reliable Hosting Provider

Secured Dedicated server

phpMyAdmin showing the foreach() error

After upgrading the cPanel version, the following error is occur when we are browsing the phpMyAdmin.

Warning: Invalid argument supplied for foreach() in /usr/local/cpanel/base/3rdparty/phpMyAdmin/tbl_replace.php on line 52

Warning: Invalid argument supplied for foreach() in /usr/local/cpanel/base/3rdparty/phpMyAdmin/tbl_replace.php on line 155

Warning: Cannot modify header information – headers already sent by (output started at /usr/local/cpanel/base/3rdparty/phpMyAdmin/tbl_replace.php:52) in /usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries/common.lib.php on line 1154

To resolve the above error, we can simply enable the output_buffering in the following file.


Change the “output_buffering” from Off to On.


Plesk Table ‘psa.sessions’ doesn’t exist

When restarting the PSA service or browsing the Plesk panel, the following error is occur.

Table ‘psa.sessions’ doesn’t exist

To resolve the above error refer to the following steps but make sure that you have logged in to the shell as a root user.

cd /var/lib/psa/dumps

Now check the available psa database backup files.

[root@myroot dumps]# ll | grep mysql.daily.dump
-rw——- 1 root root 460665 Nov 25 03:54 mysql.daily.dump.0.gz
-rw——- 1 root root 455787 Nov 24 03:44 mysql.daily.dump.1.gz
-rw——- 1 root root 455382 Nov 23 03:55 mysql.daily.dump.2.gz

As per above command result. the three backup files are present.

You can first try to generate the existing PSA database backup.

[root@myroot dumps]# mysqldump –opt -uadmin -p`cat /etc/psa/.psa.shadow` psa > psa_ori.sql
mysqldump: Got error: 1146: Table ‘psa.siteapppackages_apscategories’ doesn’t exist when using LOCK TABLES

The mysqldump also not allowing to take backup, no issue simply copy the whole /var/lib/mysql/psa directory to /var/lib/mysql/psa-back.

[root@myroot dumps]#cp -p /var/lib/mysql/psa /var/lib/mysql/psa-back -R

Now try to restore the latest backup file.

[root@myroot dumps]# gunzip mysql.daily.dump.1.gz

[root@myroot dumps]# mv mysql.daily.dump.1 mysql.daily.dump

[root@myroot dumps]#mysql -f -uadmin -p`cat /etc/psa/.psa.shadow` < /var/lib/psa/dumps/mysql.daily.dump

It will restore the backup file but some time the following error is occur.

[root@myroot dumps]# mysql -f -uadmin -p`cat /etc/psa/.psa.shadow` < /var/lib/psa/dumps/mysql.daily.dump
ERROR 1005 (HY000) at line 3636: Can’t create table ‘psa.sessions’ (errno: -1)
ERROR 1146 (42S02) at line 3654: Table ‘psa.sessions’ doesn’t exist
ERROR 1146 (42S02) at line 3655: Table ‘psa.sessions’ doesn’t exist
ERROR 1146 (42S02) at line 3656: Table ‘psa.sessions’ doesn’t exist
ERROR 1146 (42S02) at line 3657: Table ‘psa.sessions’ doesn’t exist

To resolve the above error simply follow the steps.

[root@myroot dumps]# mysql -u admin -p$(cat /etc/psa/.psa.shadow)

It will provide you mysql command prompt.

mysql> use psa;

mysql> show databases;

Now run the query given on the following URL from command prompt.

Create PS-SESSION table mysql database query

once above query completed, simply restore the psa database backup

mysql -f -uadmin -p`cat /etc/psa/.psa.shadow` < /var/lib/psa/dumps/mysql.daily.dump


If the latest psa backup file is corrupted then refer to the following steps.

Check the old psa database file and restore it.

zcat /var/lib/psa/dumps/mysql.daily.dump.2.gz | mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa




PHP code calculate age based on date of birth

Many time we do face issue to calculate the date of birth using birthday date, therefore we have created following simple PHP script to calculate the age within few seconds only.

    $diff = (date('Y') - date('Y',strtotime($dob)));
    echo $diff;

Above script will show the output as per current date and year, for example today its 22nd Nov 2016, therefore above script output will be 27 years.