httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Magin" <matt.az...@gmail.com>
Subject Re: [users@httpd] Setting up Django and PHP with Apache
Date Wed, 28 Nov 2007 01:55:58 GMT
I fixed it! The AddType was indeed sufficient, but it was wrong! It was
supposed to be application/x-httpd-php not application/x-httpd-php5. Silly
mistake.
On Nov 28, 2007 12:11 PM, Victor Trac <victor.trac@gmail.com> wrote:

> On Nov 28, 2007 1:52 AM, Matt Magin <matt.azmoo@gmail.com> wrote:
>
> > Hi there.
> >
> > I'm trying to set up Apache so that Django and PHP5 will work together.
> > I want it so that Django is set up to control everything in the document
> > root, with PHP5 enabled for specific directories. I can get both to work
> > separately, but I can't seem to get them to work in parallel.
> >
> > For Django I have:
> >
> > <Location "/">
> > SetHandler python-program
> > PythonHandler django.core.handlers.modpython
> > PythonPath "['/usr/local/www/djangoapps'] + sys.path"
> > SetEnv DJANGO_SETTINGS_MODULE intranet.settings
> > PythonDebug On
> > </Location>
> >
> > This works fine. Django is all up and running and life is good.
> >
> > Then I have this:
> >
> > <Location /safetysigns/>
> > AddType application/x-httpd-php5 .php
> > SetHandler default-handler
> > </Location>
> >
> > But every time I try and access the /safetysigns/index.php page it just
> > prompts me to download the source.
> >
> > There are no messages in the error log, which is really frustrating me.
> >
> > Any ideas?
> >
> > Cheers,
> > Matt
> >
>
> You should take out the "SetHandler default-handler" directive, which
> tells apache to handle it as static content rather than pass it off
> externally to the php parser.  The AddType by itself should be sufficient,
> provided PHP is actually loaded via mod_php or cgi. **
>
> --
> http://www.victortrac.com

Mime
View raw message