Skip to content

[bugfix][server] Fix prefix path for server - #6502

Merged
elpaso merged 2 commits into
qgis:masterfrom
elpaso:bugfix-18230-server-prefix-path
Mar 1, 2018
Merged

[bugfix][server] Fix prefix path for server#6502
elpaso merged 2 commits into
qgis:masterfrom
elpaso:bugfix-18230-server-prefix-path

Conversation

@elpaso

@elpaso elpaso commented Mar 1, 2018

Copy link
Copy Markdown
Contributor

Fixes #18230 - service configuration error (service unknown or unsupported)

I thought about placing the fix into the server code, but I believe
that it's much more cleaner here: otherwise we'd need to adjust all
other paths after they have been uncorrectly set by the application
init() code.

Note that it is always possible to override the path with an environment variable.

elpaso added 2 commits March 1, 2018 13:12
Fixes qgis#18230 - service configuration error (service unknown or unsupported)

I though about placing the fix into the server code, but I believe
that it's much more cleaner here: otherwise we'd need to adjust all
other paths *after* they were uncorrectly set by the application
init() code.
@pblottiere

Copy link
Copy Markdown
Member

Nice, thank you @elpaso 👍! We encountered this issue with @elemoine when we tried qgis server 3 from debian packages (and we had to correctly set QGIS_PREFIX_PATH environment variable to make it work).

@elpaso
elpaso merged commit baeaeac into qgis:master Mar 1, 2018
@elpaso
elpaso deleted the bugfix-18230-server-prefix-path branch March 1, 2018 21:01
@ponceta

ponceta commented Apr 11, 2018

Copy link
Copy Markdown

In qgis 3.0.1 actual official package (on ubuntu 17.10), it is still required to fix it using something like

  # FIX path to library see https://issues.qgis.org/issues/18230
  FcgidInitialEnv QGIS_PREFIX_PATH "/usr" 
@umbe1987

umbe1987 commented Oct 31, 2018

Copy link
Copy Markdown

Is this still a problem? I am experiencing the same issue as in 3liz/lizmap-web-client#793 on my fresh Ubuntu Server 18.04 install and qgis-server/bionic,now 1:3.4.0+28bionic amd64.

Unfortunately, adding FcgidInitialEnv QGIS_PREFIX_PATH "/usr" to my qgis.demo.conf file and restart apache didn't make it work.

My test was:

  • downloading the demo files from https://github.com/qgis/QGIS-Training-Data
  • extracting the qgis-server-tutorial-data in my server's folder (mine is /home/ubuntu/projects/)
  • curl http://qgis.demo/cgi-bin/qgis_mapserv.fcgi?SERVICE=WMS%26VERSION=1.3.0%26REQUEST=GetCapabilities%26map=/home/ubuntu/qgis/projects/qgis-server-tutorial-data/world.qgs

The output I am receiving (before and after the QGIS_PREFIX_PATH workaround) is:

<ServiceExceptionReport xmlns="http://www.opengis.net/ogc" version="1.3.0">
 <ServiceException code="Service configuration error">Service unknown or unsupported</ServiceException>
</ServiceExceptionReport>

P.S.: I also tried with v2.0 of the demo data but still the same exception.

@umbe1987

umbe1987 commented Nov 1, 2018

Copy link
Copy Markdown

I also added a note in the original bug https://issues.qgis.org/issues/18230#note-13

@umbe1987

umbe1987 commented Nov 3, 2018

Copy link
Copy Markdown
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants