1

I'm an architect, so that I'm used to buildings and landscapes, not to scripts and code.

Last 6 months I managed to work with GeoServer and OpenLayers, and I could obtain some good results. Now I wanted to migrate to QGIS Server because QGIS is the application I chose in my university to work with other professors and my students, and the "wysiwyg" results as server seduced us.

Our problem is that I followed all the tutorials to install QGIS Server and then I began to obtain results. Now, I'm stuck in a nice pink-tiles screen.

I could get capabilities, even read layer names in the screen. But nothing more.

I used OpenLayers and LizMap for rendering. And used my own files (.SHP and .JPG) in my own .QGS projects, and also the examples provided by 3Liz for LizMap

And... I had the same results in 3 different "devices": both my home PC and my laptop, running Windows 7 x64... and in the Lubuntu virtual machine (launched in my 2 hardware devices) provided by OsGeo Live.

This is part of my apache access.log file which shows the server doesn't provide the image:

127.0.0.1 - - [04/Oct/2013:23:11:32 +0200] "GET /qgis/qgis_mapserv.fcgi.exe?MAP=http%3A%2F%2Flocalhost%2Fqgis%2F0001%2F13100301.qgs&LAYERS=EDIFICIS%2Cbase-via%2Cbase-mansanes%2Cbase-costa%2Cbase-cases&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fjpeg&SRS=EPSG%3A4326&BBOX=-180,0,-90,90&WIDTH=256&HEIGHT=256 HTTP/1.1" 200 218
127.0.0.1 - - [04/Oct/2013:23:20:51 +0200] "GET /cgi-bin/qgis_mapserv.fcgi.exe?MAP=http%3A%2F%2Flocalhost%2Fcgi-bin%2F13100301.qgs&LAYERS=EDIFICIS%2Cbase-via%2Cbase-mansanes%2Cbase-costa%2Cbase-cases&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fjpeg&SRS=EPSG%3A4326&BBOX=-180,-90,-90,0&WIDTH=256&HEIGHT=256 HTTP/1.1" 404 227

And this is part of the errors.log which says something apout some .cpp which I don't understand.

[Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] d:\\src\\qgis-2.0.1\\src\\mapserver\\qgis_map_serv.cpp(186) : (main) Skipping GDAL ECW drivers in server.\r
[Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] d:\\src\\qgis-2.0.1\\src\\core\\qgsapplication.cpp(872) : (QgsApplication::applyGdalSkippedDrivers) Gdal Skipped driver list set to:\r
[Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] d:\\src\\qgis-2.0.1\\src\\core\\qgsapplication.cpp(873) : (QgsApplication::applyGdalSkippedDrivers) ECW\r
[Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] Warning 1: Unable to find driver ECW to unload from GDAL_SKIP environment variable.\r
[Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] d:\\src\\qgis-2.0.1\\src\\core\\qgsapplication.cpp(872) : (QgsApplication::applyGdalSkippedDrivers) Gdal Skipped driver list set to:\r
[Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] d:\\src\\qgis-2.0.1\\src\\core\\qgsapplication.cpp(873) : (QgsApplication::applyGdalSkippedDrivers) ECW JP2ECW\r
[Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] Warning 1: Unable to find driver ECW to unload from GDAL_SKIP environment variable.\r
[Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] Warning 1: Unable to find driver JP2ECW to unload from GDAL_SKIP environment variable.\r
[Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] d:\\src\\qgis-2.0.1\\src\\core\\qgsproviderregistry.cpp(201) : (QgsProviderRegistry::QgsProviderRegistry) Checking D:/OSGeo4W/apps/qgis/plugins/gdalprovider.dll: ...loaded ok (68 file filters)\r
[Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] d:\\src\\qgis-2.0.1\\src\\core\\qgsproviderregistry.cpp(118) : (QgsProviderRegistry::QgsProviderRegistry) Checking D:/OSGeo4W/apps/qgis/plugins/georefplugin.dll: ...invalid (has type method)\r
[Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] d:\\src\\qgis-2.0.1\\src\\core\\qgsproviderregistry.cpp(118) : (QgsProviderRegistry::QgsProviderRegistry) Checking D:/OSGeo4W/apps/qgis/plugins/globeplugin.dll: ...invalid (has type method)\r
[Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] d:\\src\\qgis-2.0.1\\src\\core\\qgsproviderregistry.cpp(118) : (QgsProviderRegistry::QgsProviderRegistry) Checking D:/OSGeo4W/apps/qgis/plugins/gpsimporterplugin.dll: ...invalid (has type method)\r
[Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] d:\\src\\qgis-2.0.1\\src\\core\\qgsproviderregistry.cpp(109) : (QgsProviderRegistry::QgsProviderRegistry) Checking D:/OSGeo4W/apps/qgis/plugins/grassplugin.dll: ...invalid (lib not loadable): Cannot load library D:/OSGeo4W/apps/qgis/plugins/grassplugin.dll: The specified module could not be found.\r
[Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] d:\\src\\qgis-2.0.1\\src\\core\\qgsproviderregistry.cpp(109) : (QgsProviderRegistry::QgsProviderRegistry) Checking D:/OSGeo4W/apps/qgis/plugins/grassprovider.dll: ...invalid (lib not loadable): Cannot load library D:/OSGeo4W/apps/qgis/plugins/grassprovider.dll: The specified module could not be found.\r
[Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] d:\\src\\qgis-2.0.1\\src\\core\\qgsproviderregistry.cpp(109) : (QgsProviderRegistry::QgsProviderRegistry) Checking D:/OSGeo4W/apps/qgis/plugins/grassrasterprovider.dll: ...invalid (lib not loadable): Cannot load library D:/OSGeo4W/apps/qgis/plugins/grassrasterprovider.dll: The specified module could not be found.\r
[Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] d:\\src\\qgis-2.0.1\\src\\core\\qgsproviderregistry.cpp(118) : (QgsProviderRegistry::QgsProviderRegistry) Checking D:/OSGeo4W/apps/qgis/plugins/heatmapplugin.dll: ...invalid (has type method)\r
[Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] d:\\src\\qgis-2.0.1\\src\\core\\qgsproviderregistry.cpp(118) : (QgsProviderRegistry::QgsProviderRegistry) Checking D:/OSGeo4W/apps/qgis/plugins/interpolationplugin.dll: ...invalid (has type method)\r
[Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] d:\\src\\qgis-2.0.1\\src\\core\\qgsproviderregistry.cpp(126) : (QgsProviderRegistry::QgsProviderRegistry) Checking D:/OSGeo4W/apps/qgis/plugins/libgrass_gis.6.4.3.dll: ...invalid (no isProvider method)\r
[Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] d:\\src\\qgis-2.0.1\\src\\core\\qgsproviderregistry.cpp(118) : (QgsProviderRegistry::QgsProviderRegistry) Checking D:/OSGeo4W/apps/qgis/plugins/offlineeditingplugin.dll: ...invalid (has type method)\r

I suppose some library file or some driver is missing.

For my machines, those are the specs:

  • AMD Athlon X64 Dual Core 2.4 GHz, 8Gb, Windows 7 x64, QGIS 32bit and

  • Intel Core2 T5500 1.66GHz, 2Gb, Windows 7 x64, QGIS 32bit

  • The virtual Lubuntu machine over VirtualBox following the specs from OsGeo Live

(EDIT: same problem reproduced also in a WindowsXP (SP3) 32bit computer and a WindowsXP (SP2) on virtual PC)

The installation is the provided by OSGEO4W setup, choosing QGIS, APACHE and FCGI and the default added files.

Any suggestion ?

Thank you very very very much !

EDIT (2013/10/05) : Right-clicking one of the pink images sent me to http:// localhost /cgi-bin/qgis_mapserv.fcgi.exe?MAP=http%3A%2F%2Flocalhost%2Fcgi-bin%2F13100301.qgs&LAYERS=EDIFICIS%2Cbase-via%2Cbase-mansanes%2Cbase-costa%2Cbase-cases&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fjpeg&SRS=EPSG%3A4326&BBOX=-90,0,0,90&WIDTH=256&HEIGHT=256 The server responded with error 404 if asking this link That localhost/cgi-bin is located in OSGEO4W\bin and I tried to put my project there. Now there are also pink tiles but when asking for the image alone the server gives error 500 540 in access.log and "Premature end of script headers: qgis_mapserv.fcgi.exe" in error.log

I forgot to tell that I was using QGIS 2.0.1 in all my windows tests and QGIS 1.8 in the linux ones.

[EDIT 2013-10-09 02:24 GMT+2] I rebuilt a complete computer to make a clean installation with no influences from other software. The first result was the same. Following "premature end of script..." questions I found some comments about bad installation parameters in the tutorials, so that I followed their suggestions. Finally I deleted some of the changes. Somewhere the sentence /qgis/qgis_mapserv.fcgi.exe? lacks for the "exe". I searched every file in c:\OSGEO and changed it Also I modified the httpd.qgis.conf to write every backslash as slash except the one belonging to the disk unit. The last and better change was deleting the SetHandler sentence inside httpd.qgis.conf

Since that moment my files were rendered as WMS by QGIS and others (like GlobalMapper)

But they continue NOT rendering in OpenLayers. If format is PNG, the whole map is white. If the format is JPG, the whole map are pink tiles. The same happens with Lizmap's examples. I can try to read them in Qgis or Globalmapper but not on web clients (the own Lizmap client gets stuck !)

  • Please provide further information as described in trac.osgeo.org/openlayers/wiki/TroubleshootingTips – underdark Oct 4 '13 at 22:33
  • Wild guess, but have you tried MAP=/usr/lib/cgi-bin/13100301.qgs similar to anitagraser.com/2012/09/19/… – underdark Oct 5 '13 at 22:33
  • @underdark No, I didn't. Mainly because the Lizmap example is supposed to work with no changes in its document, following all its step-by-step configuration [link] ( 3liz.com/blog/rldhont/index.php?post/2012/09/27/… ) which supposedly works on every thus-configured computers... I also tried now the change in my openlayers html page with /usr/bin, with /bin/ and also with the absolute file path. No success. – Alfons CIVIT MARTÍNEZ Oct 6 '13 at 14:24
  • Is there any more information than "premature end of script headers"? (Like here: osgeo-org.1560.x6.nabble.com/…) I haven't tried Lizmap, so I cannot confirm anything. – underdark Oct 6 '13 at 17:57
  • The only information is "Error 500 540" in Apache's access.log, and "Premature end of script headers: qgis_mapserv.fcgi.exe" in error.log I'm now going to install a clean Windows with a full Osgeo4w install in a new partition. ( Maybe it's related to other applications installed in my computers ? ) – Alfons CIVIT MARTÍNEZ Oct 7 '13 at 8:22
1

I had the same issue but in Debian Wheezy. I solved it by changing permissions to all files in the project folder to 777 (chmod 777 -R *).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.