How to enable PHP in Apache on Linux Fedora? How to enable PHP in Apache on Linux Fedora? apache apache

How to enable PHP in Apache on Linux Fedora?


  1. yum install php
  2. Restart apache.
  3. Try again.

PHP Needs to be installed itself. Its not an apache module to simply enable without first installing PHP.


You May have some Problem One Of Them is You didn't define ".php" index for Apache

like This

<IfModule mime_module>   AddType text/html .php .phps</IfModule>

see this tutorial install Apache and php

and install Apache and php


I solved this problem by re-installing httpd & php both. Then php file was executing.