[Qgis-developer] QWC wsgi search
Bernhard Ströbl
bernhard.stroebl at jena.de
Mon Jun 15 22:51:16 PDT 2015
Hi Marc,
in addition to what Andreas wrote: You should see in Apache's log file
if something goes wrong with the database connection. Things that may go
wrong in this respect are:
1) connection to the server is not allowed from the machine the wsgi
script is located on with the method used (normally username +
password); file pg_hba_conf
2) the user may connect to the server but not to the database in question
3) the user has no SELECT rights on one of the searchtables
You must have mod_wsgi installed and configured on your Apache server,
of course.
To easily debug the wsgi-search you may want to enter the search URL
directly in your browser like
http://my-page.de/wsgi/search.wsgi?query=wo&searchtables=&cb=stcCallback1001
once you get an answer there you can try it from within QWC
Bernhard
Am 15.06.2015 um 20:33 schrieb Andreas Neumann:
> Hi Marc,
>
> Here is a wsgi search query from our server:
>
> http://webgis.uster.ch/wsgi/search.wsgi?searchtables=&query=Werriker&cb=stcCallback1005
>
>
> Note that there are builtin searchtables that are always used (things
> like addresses, parcel numbers, building assurance numbers, geographic
> names, etc.) - you can add additional searchtables e.g. for waste-water
> pipes, etc.
>
> The double query parameter is a mistake and stems from the fact that it
> is by mistake also specified in GlobalOptions.js - look for a line with
>
> Konsole output
> varsearchBoxQueryURL = "/wsgi/search.wsgi?";
>
> and remove the extra query parameter. But it is not a big deal, the
> second parameter just replaces the empty one.
>
> Other than that you must check the database permissions and if the login
> parameters are correct.
>
> In the file "search.js" you have to add the default searchtables array,
> if you did not specify one in the URL - something like:
>
> Konsole output
> searchtables =
> ['surveydata.searchtable_addresses','gisdata.searchtable_geographicnames'];
>
> So please double check that your searchtables can be accessed with the
> permissions of the web server user, if the login data is correct and if
> the searchtables are specified and contain a valid structure.
>
> Hope this helps,
> Andreas
>
> On 15.06.2015 17:46, Marc B wrote:
>> Hello List,
>>
>> I am trying to connect the WSGI-Search to my PostGIS-Database.
>> Unfortunately I am reatively new to python and I dont really understand
>> which changes in the search.wsgi/qwc_connect.py I have to make.
>>
>> I've created a DB-table like the one from the github instructions.
>> I've changed the DB_CONN_STRING in qwc_connect.py.
>>
>> Some of my Questions are
>>
>> 1. Is there a way to easily test my DB-Connection in qwc_connect?
>> 2. The generated URL with parameters is not how ist supposed to be:
>>
>> https://my-page.de/wsgi/search.wsgi?query=&searchtables=&query=wo&cb=stcCallback1001
>>
>>
>> - Why are there 2 'query'-params, an empty and a correct one?
>> - the searchtables-parameter has no value, whether I put in a
>> tablename in the search.wsgi or not ( searchtables =
>> ['searchtable']; # enter your default searchtable(s) here ). Where
>> does this parameter come from? What am i doing wrong?
>>
>> If I paste the url in the url bar of chrome it says "error: no search
>> table". When I put a searchtable-value in the url i get a blank page.
>> It never says 'error: could not execute query'. So I guess, it doesnt
>> even get that far.
>>
>> Thank you
>> Marc
>> _______________________________________________
>> Qgis-developer mailing list
>> Qgis-developer at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
>
>
> __________ Information from ESET Mail Security, version of virus
> signature database 11790 (20150615) __________
>
> The message was checked by ESET Mail Security.
> http://www.eset.com
>
>
>
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
> __________ Information from ESET Mail Security, version of virus signature database 11790 (20150615) __________
>
> The message was checked by ESET Mail Security.
> http://www.eset.com
>
--
Bernhard Ströbl
Anwendungsbetreuer GIS
Kommunale Immobilien Jena
Am Anger 26
07743 Jena
Tel.: 03641 49- 5190
E-Mail: bernhard.stroebl at jena.de
Internet: www.kij.de
Kommunale Immobilien Jena
Eigenbetrieb der Stadt Jena
__________ Information from ESET Mail Security, version of virus signature database 11792 (20150616) __________
The message was checked by ESET Mail Security.
http://www.eset.com
More information about the Qgis-developer
mailing list