Tell us more about what kind of Os (Operating system you're using)
If Debian follow those steps:
# apt-get install php5-common libapache2-mod-php5 php5-cli
&
# /etc/init.d/apache2 stop
# /etc/init.d/apache2 start
Install php with mysql:
# apt-get install php5-mysql php5-curl
If you're using CentOS/RHEL
# sudo yum install php php-mysql
Exclude "#" if you copy/paste.
If you have further questions reply!