<?php phpinfo(); ?>
and uploaded that file on the root where Magento is installed on the server then I found that php-mcrypt was not installed on the server. Then I understand that the problem was coming due to that extension. It is very simple to install the php-mcrypt on the server.
1. If you are using a Debian-based Linux system, you can run the following commands:
sudo apt-get install php5-mcrypt sudo /etc/init.d/apache2 restart
Hope this will be helpful to someone.