3

I'm attempting to install QGIS Server 2.8 on Windows Server 2012 R2. I've followed the instructions here and here. I've moved all the dlls from OSGeo4W to SysWOW64 for completeness' sake. I'm still getting a the following 500 error when I attempt to use GetCapabilities:

[Tue Mar 03 11:30:13 2015] [warn] [client 127.0.0.1] (OS 109)The pipe has been ended.  : mod_fcgid: get overlap result error
[Tue Mar 03 11:30:13 2015] [error] [client 127.0.0.1] Premature end of script headers: qgis_mapserv.fcgi.exe

When I attempt to run qgis_mapserv.fcgi.exe directly from bin, I get this message:

The program can't start because qscintilla2.dll is missing from your computer. Try reinstalling the program to fix the problem. 

My httpd_qgis.conf is:

LoadModule fcgid_module modules/mod_fcgid.so

SetEnv PATH "C:\OSGeo4W\bin;C:\OSGeo4W\apps\qgis\bin;C:\OSGeo4W\apps\grass\grass-6.4.4\bin;C:\OSGeo4W\apps\grass\grass-6.4.4\lib;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem"
SetEnv QGIS_PREFIX_PATH "C:\OSGeo4W\apps\qgis"
SetEnv QT_PLUGIN_PATH "C:\OSGeo4W\apps\qgis\qtplugins;C:\OSGeo4W\apps\qt4\plugins"
SetEnv TEMP "C:\Users\ADMINI~1\AppData\Local\Temp\3"

Alias /qgis/ C:\OSGeo4W/apps/qgis/bin/

<Directory "C:\OSGeo4W/apps/qgis/bin/">
    SetHandler fcgid-script
    Options ExecCGI
    Order allow,deny
    Allow from all
</Directory>

Can anybody help me out with this error?

3
  • Is qscintilla2.dll (it's in the OSGeo4W/bin folder) in the SysWOW64 folder too?
    – SaultDon
    Mar 3, 2015 at 17:01
  • It isn't in the OSGeo4W/bin, and I'm not sure what it is and if it has further dependencies. I would have thought the the OSGeo4W installer would have pulled down everything I needed. Maybe I'm too trusting...
    – G. J.
    Mar 3, 2015 at 17:04
  • I'm not sure what other dependencies are pulled in when installing just the QGIS Server. Does it also grab QGIS which should grab Qscintilla as well? If qscintilla is also a dependency of qgis server/fcgi then it can be filed as a bug report with the OSGeo4W package maintainers.
    – SaultDon
    Mar 3, 2015 at 17:30

2 Answers 2

6

Your PYTHONPATH environment variable must be specified. QGIS Server 2.8 deals with Python extension and you must provide it a good environment.

Here is my httpd.conf

Alias /qgis/ "C:/OSGeo4W64/apps/qgis/bin/"  

FcgidInitialEnv PATH "C:\OSGeo4W64\bin;C:\OSGeo4W64\apps\qgis\bin;C:\OSGeo4W64\apps\grass\grass-6.4.3\lib;C:\OSGeo4W64\apps\grass\grass-6.4.3\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\WBem"
FcgidInitialEnv QT_PLUGIN_PATH "C:\OSGeo4W64\apps\qgis\qtplugins;C:\OSGeo4W64\apps\Qt4\plugins"
FcgidInitialEnv PYTHONHOME "C:\OSGeo4W64\apps\Python27"
#FcgidInitialEnv PYTHONPATH "C:\OSGeo4W64\apps\qgis\.\python;C:\OSGeo4W64\apps\qgis\.\python\plugins;C:\OSGeo4W64\apps\Python27\DLLs;C:\OSGeo4W64\apps\Python27\lib;C:\OSGeo4W64\bin;C:\OSGeo4W64\apps\Python27;C:\OSGeo4W64\apps\Python27\lib\site-packages"

SetEnvIf Request_URI ^/qgis QGIS_PREFIX_PATH "C:\OSGeo4W64\apps\qgis"
SetEnvIf Request_URI ^/qgis TEMP "C:\Windows\Temp"

SetEnvIf Request_URI ^/qgis GDAL_DATA "C:\OSGeo4W64\share\gdal"
SetEnvIf Request_URI ^/qgis GDAL_DRIVER_PATH "C:\OSGeo4W64\bin"
SetEnvIf Request_URI ^/qgis PDAL_DRIVER_PATH "C:\OSGeo4W64\bin"
#SetEnvIf Request_URI ^/qgis GDAL_SKIP "JP2ECW"
SetEnvIf Request_URI ^/qgis PROJ_LIB "C:\OSGeo4W64\share\proj"

<Directory "C:/OSGeo4W64/apps/qgis/bin/">
    SetHandler fcgid-script
    #SetHandler cgi-script
    Options ExecCGI
    AllowOverride all
    Order allow,deny
    Allow from all
    Satisfy any  
</Directory>

My QGIS Server is now working. Hope yours will work too

2
  • It worked for me. I just changed OSGeo4W64 by OSGeo4W and didn't use the first line. Apr 15, 2015 at 8:49
  • Sorry for the delay, I finally got back to this project. That worked like a charm and GetCapabilities finally returned something. Thanks!
    – G. J.
    Aug 4, 2015 at 15:14
3

I ran into the same problem today, I had to install the qscintilla2 dependency from the OSGeo Installer, restart Apache and then the GetCapabilities worked!

4
  • Thanks that was one step toward getting it up and running. Did you have do anything the the ECW libraries? I'm now seeing the following when running the exe. I'm still getting the same error messages from Apache, when trying GetCapabilities in the browser. C:\OSGeo4W\apps\qgis\bin>qgis_mapserv.fcgi.exe Warning 1: Unable to find driver ECW to unload from GDAL_SKIP environment variable. Warning 1: Unable to find driver JP2ECW to unload from DAL_SKIP environment variable.
    – G. J.
    Mar 5, 2015 at 15:28
  • I had no further problem with the ECW libraries or anything else after installing the qscintilla2 dependency. Maybe you are missing more dependencies? for ECW/JP2ECW?
    – copossum
    Mar 9, 2015 at 7:56
  • I got pulled away from the project for a few days. I have the good fortune of this server being a VM, so I rolled back to the base install. I suspected some of my other GIS server installs might have been messing with my QGIS Server install. I should be able to get back to in the next day or two to determine what's going on.
    – G. J.
    Mar 9, 2015 at 14:49
  • 3
    I had to give up on this. I attempted to update Apache, PHP, anything that was remotely related and got nowhere. It has become too much of a time sink. Looks like I'll have to stick to Geoserver.
    – G. J.
    Mar 11, 2015 at 17:40

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.