[Featureserver] issues running featureserver under mod-python

Matthew Perry perrygeo at gmail.com
Sun May 27 22:41:01 EDT 2007


Hey folks,

I tried to set up featureserver under mod_python and I'm not getting
very good results, perhaps due to user error ;-)  In my apache config,
I set up an alias /featurserver to point to my featureserver dir which
resides outside of the htdocs directory:

    Alias /featureserver/ "/opt/featureserver/"
    <Directory /opt/featureserver/>
        AddHandler python-program .py
        PythonPath
sys.path+['/opt/featureserver/FeatureServer','/opt/featureserver']
        #PythonPath sys.path+['/opt/featureserver/FeatureServer']
        #PythonPath sys.path+['/opt/featureserver']
        PythonHandler FeatureServer.Server
        PythonOption FeatureServerConfig /opt/featureserver/featureserver.cfg
    </Directory>



Using this configuration, I ran into the following issues:

1)
As specified in the instructions, I set
   PythonPath sys.path+['/opt/featureserver/FeatureServer']
which gives me an error
   ImportError: No module named FeatureServer

So that lead me to try:
   PythonPath sys.path+['/opt/featureserver']
Which gave the error:
   An error occurred: No module named Service

Looks like an issue with inconsistent namespaces? In any case I was
able to hack around it by specifying:

  PythonPath sys.path+['/opt/featureserver/FeatureServer','/opt/featureserver']

Probably not the best approach but I'm just trying to get this working
for the moment.

2)
Using the included openlayers demo I was able to POST a new feature
but I received the following error:

An error occurred: 501

  File "/opt/featureserver/FeatureServer/Server.py", line 118, in
modPythonHandler
    fs = util.FieldStorage(apacheReq)
  File "/usr/lib/python2.5/site-packages/mod_python/util.py", line
133, in __init__
    raise apache.SERVER_RETURN, apache.HTTP_NOT_IMPLEMENTED

Any ideas on this one?

-- 
Matthew T. Perry
http://www.perrygeo.net

"You never change things by fighting the existing reality.
To change something, build a new model that makes
the existing model obsolete" - R. Buckminster Fuller



More information about the Featureserver mailing list