[Tilecache] Re solutions issues

Eric Lemoine eric.c2c at gmail.com
Fri Nov 21 13:10:32 EST 2008


Yves, have you tried setting PYTHONHOME in the Apache config? Eric

2008/11/21, Yves Moisan <yves.moisan at boreal-is.com>:
> Chris,
>
> I half solved my issue.  Here goes -- windows users listen ;-) -- :
>
> I installed mod_python with the windows installer.  Since the Python I
> use is *not* the system Python (C:\Python24), I had to manually edit the
> registry so that files are copied in the right site-packages dir.
> (Turns out you don't really need to do that : just copying the
> site-packages mod_python dir to your local Python does the trick; see
> below).  The thing is, Apache still looks for files in my system Python
> and of course it won't find mod_python in the system Python
> site-packages because files were written to may local Python.  To test,
> I copied the mod_python dir into in my system Python site-packages dir
> and ... Bingo.  Indeed, the speed difference is staggering.  Please
> all : do not use tilecache.cgi (my humble recommendation) !
>
> Now, my problem is half-solved because I still can't get Apache to look
> for the mod_python files on my "local" Python.  I set a system
> PYTHONPATH variable to point to my local Python and tried PassEnv
> PYTHONPATH to Apache to no avail.  It still wants the files on my system
> Python.  I tried setting PYTHONPATH to include also the site-packages
> dir, both as an environment variable and in the registry to no avail.
> Any Apache wizs ?
>
> Oh and how I came to do that I owe to this post :
> http://www.mail-archive.com/python-dev@httpd.apache.org/msg01795.html,
> section on "make_obcallback: could not import mod_python.apache" where
> there is a mention how multiple Pythons on windows may lead to
> mod_python issues.
>
> Cheers,
>
> Yves
>
> Le vendredi 21 novembre 2008 à 10:42 -0500, chris marx a écrit :
>> I'm not an apache wiz, this is the first time i've installed it. i
>> would forget about trying to run the tilecache, and just focus first
>> on getting apache and mod_python installed correctly. what version of
>> apache are you trying to run? is it a windows box or linux? which
>> python installer did u use, and what version of python do you have
>> installed?
>>
>> On Fri, Nov 21, 2008 at 10:33 AM, Yves Moisan
>> <yves.moisan at boreal-is.com> wrote:
>>         Chris,
>>
>>         I mentioned I had seen a comment to the effect TC wasn't
>>         working with
>>         3.3.1.  In fact, reading that comment just gave me the idea to
>>         try and
>>         downgrade mod_python and see if Apache would start then, which
>>         proved to
>>         be OK.  So I'm not going to run TC with 3.3.1 because Apache
>>         2.0.54
>>         won't take it, not because TC won't take it ( I can't try it
>>         out for
>>         obvious reasons).
>>
>>         I can't get to http://mymachine/tilecache/tilecache.py.
>>         Looking at the
>>         how to you point to, I wonder why I need to run a setup ?  I
>>         need to
>>         find out why I can't get tilecache.py to load first I guess.
>>
>>         Thanx,
>>
>>         Yves
>>         Le vendredi 21 novembre 2008 à 09:51 -0500, chris marx a
>>         écrit :
>>
>>         > tilecache definitely works with 3.3.1, i just got it going
>>         on that
>>         > last night. did you see this great blog post?
>>         >
>>         >
>>
>> http://oegeo.wordpress.com/2008/03/10/tilecache-on-windows-part-2-mod_python/#comment-84
>>         >
>>         > it appears that the tilecache files have been updated, i
>>         didnt even
>>         > need to make the change on line 33-
>>         > chris-
>>         >
>>         > On Fri, Nov 21, 2008 at 9:43 AM, Yves Moisan
>>         > <yves.moisan at boreal-is.com> wrote:
>>         >         > compared to mod_python which has a fairly
>>         fire-and-forget
>>         >         install
>>         >         > under apache.
>>         >
>>         >
>>         >         Well not under windows ...  First thing I did is try
>>         to
>>         >         install
>>         >         mod_python 3.3.1 (currently the latest mod_python)
>>         for Python
>>         >         2.4 and
>>         >         Apache 2.0.x.  Apache wouldn't start.  Logs were not
>>         obvious.
>>         >          Anyway I
>>         >         came across a post that mentioned TC didn't work
>>         with 3.3.x so
>>         >         I went
>>         >         and installed the latest 3.2 (3.2.7).  Now Apache
>>         works.
>>         >
>>         >         Following the TC readme file, I add the required
>>         bits in
>>         >         httpd.conf :
>>         >
>>         >         <Directory "...apache2php521/tilecache-2.03/">
>>         >                AddHandler python-program .py
>>         >                PythonHandler TileCache.Service
>>         >                PythonOption TileCacheConfig
>>         >         ".../apache2php521/tilecache-2.03/tilecache.cfg"
>>         >            </Directory>
>>         >
>>         >         Ellipsis for short.
>>         >
>>         >         Then I change tilecache.cgi for tilecache.py in my
>>         html file :
>>         >
>>         >         var Ikonos_TC = new OpenLayers.Layer.WMS(
>>         >                               "Ikonos",
>>         >                               "http://" + SERVER_BASE_URL +
>>         >
>>         ":8292/tilecache/tilecache.py?map=.../mymapfile.map",
>>         >                               {layers: 'Ikonos',
>>         >                                transparent: false,
>>         >                                singleTile: false,
>>         >                                  srs: 'EPSG:29194',
>>         >                                format: 'image/jpeg'},
>>         >                               {isBaseLayer: true,
>>         >                                buffer:0,
>>         >                                transitionEffect:'resize'});
>>         >
>>         >
>>         >         I get pink tiles.  Pasting the address of one in a
>>         new tab, I
>>         >         get :
>>         >
>>         >         Internal Server Error
>>         >         The server encountered an internal error or
>>         misconfiguration
>>         >         and was
>>         >         unable to complete your request.
>>         >
>>         >         Please contact the server administrator ...
>>         >
>>         >
>>
>> ________________________________________________________________________
>>         >         Apache/2.0.54 (Win32) mod_python/3.2.7 Python/2.4.4
>>         PHP/5.2.1
>>         >
>>         >         Apache log says :
>>         >
>>         >         [Fri Nov 21 09:16:16 2008] [error] make_obcallback:
>>         could not
>>         >         import
>>         >         mod_python.apache.\n
>>         >         [Fri Nov 21 09:16:16 2008] [error] python_handler:
>>         no
>>         >         interpreter
>>         >         callback found.
>>         >         [Fri Nov 21 09:16:16 2008] [error] [client
>>         192.168.5.186]
>>         >         python_handler: Can't get/create interpreter.,
>>         referer: ...
>>         >
>>         >         I installed mod_python as per instructions so I'm
>>         clueless as
>>         >         to what to
>>         >         do next.  Tilecache.cgi worksbut .py doesn't.  Or do
>>         I have to
>>         >         move all
>>         >         the TC code in htdocs ?
>>         >
>>         >         TIA,
>>         >
>>         >         YVes
>>         >
>>         >
>>         >
>>         >
>>         >         _______________________________________________
>>         >         Tilecache mailing list
>>         >         Tilecache at openlayers.org
>>         >         http://openlayers.org/mailman/listinfo/tilecache
>>         >
>>         >
>>         >
>>         >
>>         > --
>>         >
>>         > Chris Marx
>>         > Programmer/Analyst
>>         > Cornell Lab of Ornithology
>>         > 159 Sapsucker Woods Rd.
>>         > Ithaca, NY 14850
>>         > t. 1.607.254.1142
>>         > http://www.birds.cornell.edu/
>>
>>
>>
>>
>>
>> --
>>
>> Chris Marx
>> Programmer/Analyst
>> Cornell Lab of Ornithology
>> 159 Sapsucker Woods Rd.
>> Ithaca, NY 14850
>> t. 1.607.254.1142
>> http://www.birds.cornell.edu/
>
> _______________________________________________
> Tilecache mailing list
> Tilecache at openlayers.org
> http://openlayers.org/mailman/listinfo/tilecache
>


More information about the Tilecache mailing list