On Nov 28, 2007 1:52 AM, Matt Magin <[EMAIL PROTECTED]> 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

Reply via email to