Bug report #20873
QGIS Server 3.4 broken on Windows
|Affected QGIS version:||3.4.4||Regression?:||Yes|
|Operating System:||Windows||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||28692|
Latest QGIS Server from OSGeo4W doesn't work. Maybe is related to Python configuration.
This are Apache environment variables used (I checked, they are valid paths):
SetEnv GDAL_DATA "C:\OSGeo4W64\share\gdal"
SetEnv QGIS_AUTH_DB_DIR_PATH "C:\OSGeo4W64\apps\qgis\resources"
SetEnv PYTHONHOME "C:\OSGeo4W64\apps\Python37"
SetEnv PATH "C:\OSGeo4W64\bin;C:\OSGeo4W64\apps\qgis\bin;C:\OSGeo4W64\apps\Qt5\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;"
SetEnv QGIS_PREFIX_PATH "C:\OSGeo4W64\apps\qgis"
SetEnv QT_PLUGIN_PATH "C:\OSGeo4W64\apps\qgis\qtplugins;C:\OSGeo4W64\apps\Qt5\plugins;"
Request takes over 7 seconds and generates broken response, some text on screen but not complete XML.
Attached is QGIS Server log file only for that request.
#2 Updated by Paul Blottiere over 2 years ago
Hi @Uroš Preložnik,
Request takes over 7 seconds
It's very strange considering that the logfile is stating 08:33:52 INFO Server3568: Request finished in 118 ms.
and generates broken response, some text on screen but not complete XML.
Can you give us the text which is actually displayed? Moreover, it seems that QGIS_PROJECT_FILE environment variable is empty as well as the MAP parameter. So the server will probably raise an exception.
Thanks for your report and send us news :).
#4 Updated by Uroš Preložnik over 2 years ago
- File qgis-server-3.4.4.log added
- Status changed from Feedback to Open
- File qgis server 3.4.4 uncomplete response.xml added
Thanks for dealing with this.
Missing MAP parameter is not relevant, I always test server with plain GetCapabilities request. This should give XML reponse. So before dealing with projects and data just check if server is working, and it doesn't in this case.
First I updated my install from 3.4.2 to 3.4.4 (QGIS Desktop+server). Problem is the same, and I'm pretty sure that something with Python is messed up. Now I have Python27+Pythno37 (previously only 37).
I'm attaching uncomplete QGIS Server response and QGIS Server log file containing Python errors.
Hope it helps.
#7 Updated by João Gaspar over 2 years ago
Windows 10 Home 64-bits
QGIS 3.4.5 Madeira 64-bits
Uros, I did a clean install with Apache Lounge Installers [https://www.apachelounge.com/download/]. I put the configurations in attach for httpd.conf and virtualhosts.config.
Note: The correct Python paths variables need to be pointed to 3.7.
#9 Updated by Uroš Preložnik about 2 years ago
Thanks João, so with your config QGIS server is running correctly, right?
I checked but nothing special, my paths are all valid also. I did another install today with latest LTR (3.4.7) but problem is the same.
What do you get if you run GetCapabilities (from your config should be something like that, correct if i wrote wrong):
Example of plain response what I can't get on Windows and is without MAP parameter is using this test server: