[mod_python]Re: R: [mod_python] Problems with mptest.py (Windows)

Jirka Machotka jirka.machotka at seznam.cz
Sun Dec 15 21:04:20 EST 2002


This is an informational issue covering somehow the solution to my
problem. It sums up few other answers - thanx for all of them! - and
as such it should be a simple handy to anyone who wants to run the
Apache with mod_python on Windows. I'd love to have something like
that a month ago (it'd spare me from few white hairs by now)

1. if you install the Apache and you want to connact it to the python
interpret all you need is a file called mod_python.so

Put it to the /modules subdirectory and add the line
   LoadModule python_module modules/mod_python.so 
to the httpd.conf

Restart the Apache server. If you get an error (cannot load
C:\...\modules\mod_python.so into server: the module could not be
found ) you need to get a file called msvcr70.dll (e.g. from
www.dll-files.com/dllindex/dll-files.shtml?msvcr70) and copy it into
\winnt\system32 (thanx to Duncan Booth for this hint). Do not forget
to restart the Apache when it's done.

This and the modification of httpd.conf file as described in the
manual should be enough so that the Apache sends all the file with
*.py extension to be processed by python

2. in order to be able to use Apache related objects in python you
need also their sources. Get the mod_python-3.0.1.tgz file, unpack
it, find the subdirectory called \site-packages and copy it into the
subdirectory of the same name of your Python installation. I know it
sounds obvious for anyone who knows about it, but honestly I could
not get this point from the manual. 

If you don't do it you will face the same problems as I did (just
scroll below for details)


Dne 5. prosinec 2002, Manera, Villiam, <vmanera at manord.com> napsal:

> e circa il problema che dava a te?
> 
> -----Messaggio originale-----
> Da: Jirka Machotka [mailto:jirka.machotka at seznam.cz]
> Inviato: giovedi 5 dicembre 2002 12.18
> A: mod_python at modpython.org
> Oggetto: [mod_python] Problems with mptest.py (Windows)
> 
> 
> Hello there,
> 
> I have probably a very basic question. However, I could not find
> anything relevant (a searching machine would be fine)
> 
> I had had problems with running the mod_python for Apache 2.0.43.
> Following the advice I had gotten the msvcr70.dll, put it to the
> required directory and restarted the Apache. The Apache starts,
> however, when I try to fetch mptest.py (it looks exactly as described
> in the manual, the configuration file httpd has been modified
> accordingly) I receive an error:
> 
> make_obcallback: could not import mod_python.apache
> 
> To my understanding the problem relates rather to Python (my version
> is 2.2.1). The manual mentions that Python environment must be
> recompiled, or what. I'm afraid that's not possible for me
> (recompiled in what?) Or am I missing something inportant?
> 
> 
> Please help. Thanks in advance.
> 
> Jiri
> 
> ______________________________________________________________________
> Reklama:
> Soutěž o auto na víkend, autorádio Clarion a další ceny:
> http://ad2.seznam.cz/redir.cgi?instance=12345%26url=http://www.auto-plus.cz
>  - nejlepší systém prodeje ojetých vozů na internetu
> 
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://www.modpython.org/mailman/listinfo/mod_python
> 

______________________________________________________________________
Reklama:
Vyhrajte cenu za 100.000,- Kc v souteži "Svetem Financí
za 30 dní" na http://soutez.finance.cz. Než Vás predbehnou jiní!




More information about the Mod_python mailing list