[mod_python] Module conflicts on mod_python

rmunn at pobox.com rmunn at pobox.com
Mon Oct 7 09:06:37 EST 2002

On Mon, Oct 07, 2002 at 05:55:51PM +0800, Michael Teo wrote:
> Hi, I am fortunate enough to be able deploy mod_python on a commercial web
> server. 
> However, I am currently being plagued by this problem.
> I am running Apache 1.3.27 with mod_python 2.7.8 and python 2.2.1.
> Virtualname hosting is enabled on Apache to allow virtual domainname hosting.
> Now, say domain A and domain B has some mod_python publisher scripts which
> import a session.py script. Only one session.py in either domain A or domain
> B is loaded. However, the implementation of session.py is very different in
> both domains and this causes a whole lot of errors on either A or B scripts.
> Is there a misconfiguration in my httpd.conf, or is that supposed to be the
> part of the feature with mod_python ?
> Any advice will be greatly appreciated.
> Thanks in advance.
> The following are the contents of the .htaccess file in the cgi-bin 
> directories. PythonPath are modified accordingly to the domainA and domainB.
> AddHandler python-program .py .pyc
> PythonHandler mod_python.publisher
> PythonPath "sys.path + [ '/home/www/domainA/public_html/cgi-bin' ]

Do you have the PythonInterpPerDirectory directive turned on? It would
allow domain A and domain B's scripts to run in separate Python
interpreters with completely separate namespaces, so their session.py
scripts could not conflict with each other. For more information:


Robin Munn
rmunn at pobox.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mailman.modpython.org/pipermail/mod_python/attachments/20021007/bc29ddb4/attachment-0003.bin

More information about the Mod_python mailing list