[Featureserver] First steps

Lehtonen, Mika mika at digikartta.net
Mon Nov 24 04:00:32 EST 2008


Hi again,

I am still trying to take my first step with FeatureServer. I built OGR 
with Python bindings and it seemed to be succesfull (gdal 1.5.3) but,
now I get this:
An error occurred: libgdal.so.1: cannot open shared object file: No such 
file or directory File 
"/var/digikartta.net/cgi-bin/featureserver-1.12/FeatureServer/Server.py", 
line 264, in cgiHandler service = Server.load(*cfgfiles) File 
"/var/digikartta.net/cgi-bin/featureserver-1.12/FeatureServer/Server.py", 
line 69, in _load config, section, 'DataSource') File 
"/var/digikartta.net/cgi-bin/featureserver-1.12/FeatureServer/Server.py", 
line 43, in _loadFromSection module = __import__("%s.%s" % (module_type, 
type), globals(), locals(), type) File 
"/var/digikartta.net/cgi-bin/featureserver-1.12/FeatureServer/DataSource/OGR.py", 
line 14, in <module> import ogr File 
"/usr/local/lib/python2.6/site-packages/ogr.py", line 2, in <module> 
from osgeo.gdal import deprecation_warn File 
"/usr/local/lib/python2.6/site-packages/osgeo/gdal.py", line 7, in 
<module> import _gdal

What's wrong with my configuration. Any ideas? Should I have used some 
other options also when building than '--with-python'?

- mika -

Lehtonen, Mika kirjoitti:
> Ok,
> I just lost three hours. If I edit featureserver.cgi through FTP 
> (WinSCP), I got Internal Server Error. But that cgi is easy to fix. I 
> just open it into Linux editor and save it again. No more ISE!
>
> Hallelujah,
> - mika -
>
> Lehtonen, Mika kirjoitti:
>   
>> Hi again,
>>
>> I have been now trying to get FeatureServer work in my own server. I 
>> followed the procedure that I used earlier; with which FS worked except 
>> the OGR was missing. Now I get 'Internal Server Error' and if I check 
>> the error log, there is said that: "(2)No such file or directory: exec 
>> of '....featureserver.cgi' failed and after that: "Premature end of 
>> script headers: featureserver.cgi".
>>
>> In this server I have Python 2.3.4 and the earlier one had 2.4.x. Does 
>> it have something to do with the error?
>>
>> Other CGI-scripts seem to be working in that directory.
>>
>> - mika -
>>
>> Lehtonen, Mika kirjoitti:
>>   
>>     
>>> Ok,
>>> I see, now I feel stupid. I tried to test FeatureServer in my operator's 
>>> server. They definitely don't have the ogr. Yeah, OS is anyway Linux. I 
>>> have to switch on to my own Centos server. Just been having some 
>>> problems in installing/building Apache httpd.
>>>
>>> thanks,
>>> mika
>>>
>>> Josh Livni kirjoitti:
>>>   
>>>     
>>>       
>>>> Mika,
>>>>
>>>> As the traceback notes:  "An error occurred: No module named ogr"  So 
>>>> the issue is you don't have OGR python bindings installed on your 
>>>> system, or at least not for the python being used by featureserver.
>>>>
>>>> If you are running windows, there are some (slightly out of date, but 
>>>> probably functional) instructions 
>>>> at http://os.umbrellaconsulting.com/wiki/FeatureServerOnWindows that 
>>>> might help you get started with a simple demo.
>>>>
>>>> If linux, I assume you should be ok figuring out how to install ogr, 
>>>> but if not write back with more info on your setup and your attempted 
>>>> steps/errors.
>>>>
>>>>
>>>>   -Josh
>>>>
>>>>
>>>>
>>>> On Thu, Nov 20, 2008 at 8:21 AM, Lehtonen, Mika <mika at digikartta.net 
>>>> <mailto:mika at digikartta.net>> wrote:
>>>>
>>>>     Hi,
>>>>
>>>>     I've been trying to use FeatureServer for an hour now and might have
>>>>     something else to do. So I'm taking a short cut, if someone can
>>>>     help me.
>>>>
>>>>     I have a web server with CGI, so I uploaded the FeatureServer code in
>>>>     there. I added the following into cfg-file:
>>>>
>>>>     [shape]
>>>>     type=OGR
>>>>     dsn=/var/www/cgi-bin/featureserver-1.12/name-of-my-shape.shp
>>>>     layer=myshape
>>>>
>>>>     But I am getting this, when trying to call the featureserver.cgi
>>>>
>>>>     An error occurred: No module named ogr
>>>>      File
>>>>     "/var/www/cgi-bin/featureserver-1.12/FeatureServer/Server.py",
>>>>     line 264, in cgiHandler
>>>>        service = Server.load(*cfgfiles)
>>>>      File
>>>>     "/var/www/cgi-bin/featureserver-1.12/FeatureServer/Server.py",
>>>>     line 68, in _load
>>>>        datasources[section] = cls.loadFromSection(
>>>>      File
>>>>     "/var/www/cgi-bin/featureserver-1.12/FeatureServer/Server.py",
>>>>     line 43, in _loadFromSection
>>>>        module = __import__("%s.%s" % (module_type, type), globals(),
>>>>     locals(), type)
>>>>      File
>>>>     "/var/www/cgi-bin/featureserver-1.12/FeatureServer/DataSource/OGR.py",
>>>>     line 14, in ?
>>>>        import ogr
>>>>
>>>>     If I remove that [shape], I get this:
>>>>
>>>>     {"Layers": []}
>>>>
>>>>     So, what's wrong?
>>>>
>>>>     - mika -
>>>>
>>>>
>>>>
>>>>
>>>>     _______________________________________________
>>>>     Featureserver mailing list
>>>>     Featureserver at openlayers.org <mailto:Featureserver at openlayers.org>
>>>>     http://featureserver.org/mailman/listinfo/featureserver
>>>>
>>>>
>>>>     
>>>>       
>>>>         
>>> _______________________________________________
>>> Featureserver mailing list
>>> Featureserver at openlayers.org
>>> http://featureserver.org/mailman/listinfo/featureserver
>>>   
>>>     
>>>       
>> _______________________________________________
>> Featureserver mailing list
>> Featureserver at openlayers.org
>> http://featureserver.org/mailman/listinfo/featureserver
>>   
>>     
> _______________________________________________
> Featureserver mailing list
> Featureserver at openlayers.org
> http://featureserver.org/mailman/listinfo/featureserver
>   



More information about the Featureserver mailing list