Adrien Plisson
rien at yeepa.org
Wed Aug 7 23:05:30 EST 2002
Hello, I see a lot of posts concerning mod_pythonh under win32. So, here is my own experience: the first time i tried to install mod_python under windows 2000 i had to tweak a bit with the install. I posted something about that some months ago. Here is what you should do: - install apache, you can find precompiled binaries at www.apache.org - install python. ActiveState is giving a very good distribution of python for windows for free called ActivePython (www.activestate.com) - install mod_python. this means you have to download any distribution of mod_python AND the precompiled mod_python.dll. then follow the instructions in the mod_python manual (appendix A: Windows installation) except for those points : - point 1: * "Move (or just drag & drop) the mod python-x folder into the Python lib folder (i.e C:\ Program Files\ Python\ lib)." the mod_python-x folder should also be renamed 'mod_python' * "Move the files in the folder lib inside the mod python folder (C:\ Program Files\ Python\ lib\ mod_python-x\ lib\ mod python) to the C:\ Program Files\ Python\ lib\ mod_python folder. It's safe to delete these folders we just emptied." the first path is incorrect: it's '...\lib\mod_python-x\python\mod_python\' - point 2: * it talks about adding the LoadModule directive, but on my installation, i had also to add a AddModule directive. then it should run. be aware that: - if mod_python scripts are not in a folder covered by PYTHON_PATH then it won't be found. on Win32, PYTHON_PATH is stored in the registry at HKLM\SOFTWARE\PYTHON\PYTHONCORE\<version>\PYTHONPATH - the warning about EAPI is an apache warning, not a mod_python warning, so you have to recompile apache with -DEAPI, or download another precompiled version from the apache website. - the mod_ython documentation talks about python 1.5.2 or 2.0 and apache 1.3: for me, it runs with python 2.1, apache 1.3.23 and mod_python 2.7.4 - you simply CAN'T do a 'from mod_python import apache' in a python shell. you HAVE TO be running under apache. - included with apache are 2 modules named mod_info and mod_status which are great tools to know if mod_python is running fine or was just ignored. - the precompiled binaries of all stuffs you have to install are perfect enough, don't try to compile them on your own unless you really know your compiler (knowing it is much harder than anyone can think of) So this is the most i can remember for the moment. i hope it will help... if some points are not clear enough, just tell me, i will try to be more precise. -- rien
|