[Featureserver] First steps

Lehtonen, Mika mika at digikartta.net
Thu Nov 20 18:32:46 EST 2008


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
>   



More information about the Featureserver mailing list