I am using ubuntu 11.04 and when I am opening terminal and typing php -a it is showing some error like this
php -a
PHP Warning: PHP Startup: Unable to lo
Yeah. Just try:
sudo apt-get install php5-gd
You probably will have to remove the offending line in your php.ini, either in php.ini or in /etc/php5/conf.d/gd.ini maybe.