Bug 450629 - Default installation of php module on apache fail to work
Default installation of php module on apache fail to work
Product: Fedora
Classification: Fedora
Component: httpd (Show other bugs)
x86_64 Linux
low Severity low
: ---
: ---
Assigned To: Joe Orton
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-06-09 20:40 EDT by Gabriele
Modified: 2008-07-06 07:28 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-07-06 07:28:08 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Gabriele 2008-06-09 20:40:16 EDT
Description of problem:
In default installation of httpd and related php module, php scripts fails to be

Version-Release number of selected component (if applicable):

Fedora 9:

Server version: Apache/2.2.8 (Unix)
Server built:   Feb 25 2008 07:05:19

PHP 5.2.5 (cli) (built: Apr 24 2008 10:37:47) 
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

How reproducible:

Steps to Reproduce:
1. Install default version of httpd and realted php package from yum
2. Start httpd
3. Open with your browser one of yours web page with php code like:
          - /var/www/html/pippo.php
          <body><?php echo '<h1>ciao</h1>'; ?> </body></html>

Actual results:
Firefox display something like this:
'; ?>

Expected results:
That firefox display the right php code result

Additional info:

I made my own bugfix by adding php.conf in /etc/var/httpd/conf.d/ where there's
only welcome.conf and proxy_ajp.conf files. The file is:

# Loading module for php (it's courious that in httpd.conf there's not line 
# about this, but there's others LoadModule directives. Well there's also the 
# libphp5.so files)
LoadModule php5_module modules/libphp5.so
AddHandler php5-script .php
AddType text/html .php
DirectoryIndex index.php
Comment 1 Johan Kok 2008-07-06 07:28:08 EDT
Thank you for reporting this issue. The default php package contains a php.conf file that is placed in 
/etc/conf.d/. You can check that by executing 'rpm -ql php | grep "/etc/httpd/conf.d"'. The file contains 
instructions for loading the module and setting the php interpreter to handle files with a .php extension.  

Why that file was not present on your system is not clear to me. You could try to remove php ('yum remove 
php') and than reinstall php ('yum install php'). 

I'm closing this issue as NOTABUG, but feel free to reopen this issue if the problem persists.

Note You need to log in before you can comment on or make changes to this bug.