[rt-users] RT, Apache and PHP
Bruce Campbell
bruce_campbell at ripe.net
Wed Feb 13 09:45:50 EST 2002
On Fri, 8 Feb 2002, Rich Lafferty wrote:
> On Fri, Feb 08, 2002 at 07:48:30PM -0500, Bolivar Geraldo (bgeraldo at sockeye.com) wrote:
> > I'm running the RT 2.0.11
> >
> > I have installed PHP4 on the server that is running my company's RT
> > instance, but I'm having trouble getting Apache to parse .php files.
> > When I comment the following out of my httpd.conf, everything works
> > fine:
> >
> > PerlModule Apache::DBI
> > PerlFreshRestart On
> > PerlRequire /opt/rt2/bin/webmux.pl
> > <Location />
> > SetHandler perl-script
> > PerlHandler RT::Mason
> > </Location>
> >
> > When I put it back in, I get asked to download the .php file instead of
> > parsing it. Can anyone tell me what exactly the code above does and/or
> > if there is a way around this?
>
> That <Location> block says to use the handler perl-script for
> everything under "/". Probably not what you want, but I'm not sure
> where the PHP-related stuff might reside to tell you how to fix it.
And there you have both the crux of, and the answer to the problem.
Simple answer is "Don't mix HTML::Mason (RT) and PHP in the same tree."
RT's default installation docs assumes that RT is the only thing running
on that (virtual) server. It is quite possible to run it as
'http://www.example.com/rt/' instead of 'http://www.example.com/'.
To do this, change the 'Location' to read:
<Location /rt/>
Change etc/config.pm:
$WebPath = "/rt";
( Note that WebURL is built up of $WebBaseURL . $WebPath . "/" )
Then, change your installation such that your RT's WebRT directory matches
www.example.com/rt .
You will still have the problem of php files if they are beneath the RT
directory (which they should not be). You should not have the problem of
php files in other places in your hierarchy.
Regards,
--
Bruce Campbell RIPE
Systems/Network Engineer NCC
www.ripe.net - PGP562C8B1B Operations
More information about the rt-users
mailing list