[mapserver-users] Fwd: Mapserver and Zope
Jean-Francois.Doyon at ccrs.nrcan.gc.ca
Jean-Francois.Doyon at ccrs.nrcan.gc.ca
Wed Sep 18 14:05:03 PDT 2002
Hello,
Thanks to Norman's help, I've finally got my python mapscript up and
running.
Now I just have one rather major concern. How stable is the module? I mean,
as far as thread safety and memory leaks? I worry that loading such a
complex module into zope could have consequences, especially as I keep
hearing about the threading issues of libmap in relation to PHP. Does python
suffer from the same problems?
Anybody tested this? Or used it enough to know whether python mapscript can
safely be used in a production zope environment?
Any insight on this would be appreciated :)
thanks,
J.F.
-----Original Message-----
From: Sean Gillies [mailto:snchrstnglls at yahoo.com]
Sent: Wednesday, September 18, 2002 2:27 PM
To: jacobi at dfki.de; mapserver-users at lists.gis.umn.edu
Subject: Re: [mapserver-users] Fwd: Mapserver and Zope
Sven,
I've seen and overcome each of these issues.
Any Zope method that uses mapscript should be an
external method because you'll need to access a
map file on the filesystem. As well, if you want
to use the module 'sys', you'll need to make
drawmap() into an external method.
Next, you need to build mapscript using the same
python version as comes with Zope. If you're using
Zope 2.5, you'll need to build python mapscript
with python 2.1, and then install mapscript inside
Zope's own python. You can do this manually or by
using a --prefix option with the setup.py script.
Once you get a mapscript installed among your other
Zope python modules, you should be ready to go.
Now, the drawing errors: I experienced some problems
like this with the 3.5 version of mapserver, and the
problems went away when I moved up to mapserver 3.6
and 3.7. So, honestly, I didn't overcome this
problem, but jumped over it.
Hope this helps. cheers,
Sean
--- Steve Lime <steve.lime at dnr.state.mn.us> wrote:
> ATTACHMENT part TEXT message/rfc822
> Date: Thu, 12 Sep 2002 13:52:35 +0200
> From: Sven Jacobi <jacobi at dfki.de>
> To: steve.lime at dnr.state.mn.us
> Subject: Mapserver and Zope
>
> Hello,
>
> I've seen your mails in the lists of mapserver and I
> have some
> problems to which you (I hope so) could give me some
> hints...
>
> I'm trying to use Mapserver in Zope which is Python
> based.
> I've already "swigged" the libraries to Python and
> it seemed
> to work.
> But now I have got several problems:
> 1.When I try to test Mapserver with Python, I get a
> Segementation Fault
> when calling the draw()-function...below the
> code:
>
> import sys
> from mapscript import *
>
> def drawmap(width=400, height=300, align="left"):
> mymap = mapObj("/home/...")
> mymap.width=width
> mymap.height=height
> myimage=mymap.draw()
>
> drawmap()
>
> Is it possible that my Python-version isn't correct,
> because it seems to
> be an
> error while changing to "C"...?
>
> 2. In Zope I always get an error because of failed
> authorization. This
> is independent of
> the way I try it ( External Method or Python
> Script).
>
> Have you any idea where these errors might come
> from?
>
> I would be very glad to get an answer,
>
> thanks in forward,
>
> Cheers,
>
> Sven
>
__________________________________________________
Do you Yahoo!?
Yahoo! News - Today's headlines
http://news.yahoo.com
More information about the MapServer-users
mailing list