|
Huzaifa Tapal
huzaifa at hostway.com
Thu Sep 8 17:46:25 EDT 2005
Hello all,
I have a question about the usage of the PythonInterpPerDirectory and
PythonInterpPerDirective directives. I am trying to setup a development
box with mod_python support, and want to set it up in a way so that
different users, within their cgi-bin can have multiple mod_python
handler installations and each handler having its own set of
sub-interpreters. After doing some research I found that the usage of
the above two directives is the solutions (or maybe something else that
I am not aware of).
I am trying to set the above directive in my httpd.conf file as follows:
<Directory /home/*/www/cgi-bin/>
PythonInterpPerDirective On # or PythonInterpPerDirectory On
</Directory>
now I test this by creating two directories within a user's cgi-bin say
/home/user/www/cgi-bin/handler1 and /home/user/www/cgi-bin/handler2 and
add a handler module and a .htaccess file with the following contents:
SetHandler mod_python
PythonHandler mptest
PythonDebug On
Within the handlers, I am creating a cache dictionary at global level
and testing the cache for that dictionary by printing its values and
also printing the id of the cache dictionary. When executing both
handlers, it appears that both handlers in both directories are sharing
the subinterpreters when they should not be.
Seeing that, I then create a .htaccess file in /home/user/www/cgi-bin
directory with the contents:
PythonInterpPerDirective On # or PythonInterpPerDirectory On
that seems to work as I want it to work.
The questions I have are:
1. Why doesn't adding the PythonInterpPerDirec* directive work when I
added to the server configuration file?
2. Whats the best way to turn that directive on for all user's
cgi-bin directories server wide without adding a .htaccess file
for each user individually?
3. Is there a better way of accomplishing what I want other than the
directives?
Any help will be appreciated.
Hozi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20050908/452a8ebe/attachment.html
|