We have to follow the steps :
First, install mod_php.
Second run the command : AddHandler application/x-httpd-PHP .phtml .php