How to install Apache w/ PHP when "yum install httpd php" fails?

Sharpe, Sam J sam.sharpe+lists.redhat at gmail.com
Mon Sep 28 19:18:53 UTC 2009


2009/9/28 Kelly Jones <kelly.terry.jones at gmail.com>:
> I did "yum install httpd php" to install Apache w/ PHP, and created a
> test page with "<?php phpinfo(); ?>". When I visit it and view source,
> I get back "<?php phpinfo(); ?>" instead of my PHP config.
>
> /etc/httpd/conf/httpd.conf says nothing about PHP, so I suspect I did
> the install wrong.
>
> How do I enable PHP support in Apache?

More information needed...

0) Does this command return the same on your system?
[sam at www ~]$ grep "Include " /etc/httpd/conf/httpd.conf
Include conf.d/*.conf

1) What does /etc/httpd/conf.d/php.conf say? Does it exist?

2) What is the extension of your web page? (is it .php?)

3) Are you definitely viewing it through the Webserver and not locally on disk?

-- 
Sam




More information about the fedora-list mailing list