[Tfug] apache/php problem

John Gruenenfelder johng at as.arizona.edu
Sun Feb 11 19:54:42 MST 2007


Hey all,

I've got a problem on one of the machines I semi-maintain.  It's runing Red
Hat Enterprise Linux WS release 3.  Rather old, I know, but that's what it
is.  The machine is current with it's updates via up2date.

It's running Apache 2 with PHP4, but I can't seem to get PHP to work.
Specifically, I'm trying to get Squirrelmail working again.  It used to, but I
think up2date may have "fixed" that for me.

When I try to access anything PHP, my browser simply wants to download the
.php file.  Apache never seems to parse them.

The php module (libphp4.so) is loaded.  The config statements are present to
make PHP work:

------------------------------------------------

LoadModule php4_module modules/libphp4.so

#
# Cause the PHP interpreter handle files with a .php extension.
#
<Files *.php>
    SetOutputFilter PHP
    SetInputFilter PHP
    LimitRequestBody 524288
</Files>

#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.php

------------------------------------------------

But this doesn't seem to do it.  I enabled the "info" module so I could see
just what Apache is loading.  Now, on another machine using PHP5 I can see
clearly that the PHP5 module is loaded.  But on this machine, on the info page
instead of seeing php4_module or some such I see:

------------------------------------------------
Module Name: sapi_apache2.c
Content handlers: none
Configuration Phase Participation: Create Directory Config, Merge Directory
Configs
Request Phase Participation: Post-Read Request
Module Directives:
    php_value - PHP Value Modifier
    php_flag - PHP Flag Modifier
    php_admin_value - PHP Value Modifier (Admin)
    php_admin_flag - PHP Flag Modifier (Admin)
    PHPINIDir - Directory containing the php.ini file
------------------------------------------------

On the working machine the info page displays something *very* similar to
this, but instead of "sapi_apache2" I see "mod_php5" which makes sense.  Also,
the latter says "Content handlers: yes" which also seems good.

Where have I gone wrong?  There are no errors of any kind in the log files.
If I add a second "LoadModule" line for PHP4, on the thinking that maybe it
didn't really load it, then Apache tells me at startup that it has already
loaded that modules.

I suppose some of the problem comes from my unfamiliarity with Red Hat (of any
flavor).  It was really easy to get running in Debian, but I don't think it
should be this hard with RH...

Help please.  :)


-- 
--John Gruenenfelder    Research Assistant, UMass Amherst student
                        Systems Manager, MKS Imaging Technology, LLC.
Try Weasel Reader for PalmOS  --  http://gutenpalm.sf.net
"This is the most fun I've had without being drenched in the blood
of my enemies!"
        --Sam of Sam & Max




More information about the tfug mailing list