Bug 450629 - Default installation of php module on apache fail to work
Summary: Default installation of php module on apache fail to work
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: httpd
Version: 9
Hardware: x86_64
OS: Linux
low
low
Target Milestone: ---
Assignee: Joe Orton
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-06-10 00:40 UTC by Gabriele
Modified: 2008-07-06 11:28 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2008-07-06 11:28:08 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Gabriele 2008-06-10 00:40:16 UTC
Description of problem:
In default installation of httpd and related php module, php scripts fails to be
loaded.

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

Fedora 9: 2.6.25.4-30.fc9.x86_64

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
          <html><head><title>pippo</title></head>
          <body><?php echo '<h1>ciao</h1>'; ?> </body></html>



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



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 11:28:08 UTC
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.