You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mod_python-dev@quetz.apache.org by Daniel Popowich <dp...@comcast.net> on 2004/09/06 21:31:17 UTC

PythonImport inside VirtualHost not an error?

If I put PythonImport inside a <Directory> then `apachectl configtest`
will tell me:

    Syntax error on line 17 of /etc/httpd/conf.d/python.conf:
    PythonImport not allowed here

Likewise, if I put the same directive inside a .htaccess I get a 500
error and the error log has:

[Mon Sep 06 15:26:59 2004] [alert] [client 192.168.1.2] /home/popowich/public_html/py/.htaccess: PythonImport not allowed here, referer: http://fubar.com/~popowich/py/test

But if put the same directive inside a VirtualHost I'm told:

    Syntax OK

And at runtime nothing happens, no import, no errors.

Why?  If a directive does not function inside a VirtualHost, should
not an error be generated, like those above?  I accidently put a
PythonImport inside a VirtualHost and spent WAY too much time tracking
down why my import wasn't happening.  If `apachectl configtest` had
warned me of the error I would have realized my misplacement
immediately.

Is this a bug?

I'm running mod_python 3.1.3 with apache 2.0.40.

Daniel Popowich
-----------------------------------------------
http://home.comcast.net/~d.popowich/mpservlets/