0

I try to set qgis-server by OsGeo4w-install from internet on windows. But the browser show link this [![brower show][1]][1] when I visit http://localhost:8888/cgi-bin/qgis_mapserv.fcgi.exe?MAP=C:/OSGeo4W64/apps/qgis/bin/world.qgs&LAYERS=countries&SERVICE=WMS&REQUEST=GetMap&CRS=EPSG:4326&WIDTH=400&HEIGHT=200. and the Apache error.log show:

[Tue Mar 16 01:05:52.653976 2021] [cgi:error] [pid 13192:tid 1852] [client ::1:54190] AH01215: proj_create_from_database: Cannot find proj.db\r: C:/OSGeo4W64/apps/qgis/bin/qgis_mapserv.fcgi.exe
[Tue Mar 16 01:05:52.653976 2021] [cgi:error] [pid 13192:tid 1852] [client ::1:54190] AH01215: proj_get_authorities_from_database: Cannot find proj.db: C:/OSGeo4W64/apps/qgis/bin/qgis_mapserv.fcgi.exe
[Tue Mar 16 01:05:52.653976 2021] [cgi:error] [pid 13192:tid 1852] [client ::1:54190] AH01215: proj_as_wkt: Cannot find proj.db: C:/OSGeo4W64/apps/qgis/bin/qgis_mapserv.fcgi.exe
[Tue Mar 16 01:05:52.654975 2021] [cgi:error] [pid 13192:tid 1852] [client ::1:54190] AH01215: proj_create_from_database: Cannot find proj.db: C:/OSGeo4W64/apps/qgis/bin/qgis_mapserv.fcgi.exe
[Tue Mar 16 01:05:52.654975 2021] [cgi:error] [pid 13192:tid 1852] [client ::1:54190] AH01215: proj_create_from_database: Cannot find proj.db: C:/OSGeo4W64/apps/qgis/bin/qgis_mapserv.fcgi.exe ```

If it is a GDAL or proj problem, then how do I fix it?

  [1]: https://i.stack.imgur.com/rFN0C.png

1 Answer 1

1

You need to set in your Apache virtualhost PROJ_LIB variable environment with something like

SetEnv PROJ_LIB "C:\OSGeo4W64\share\proj"

You QGIS fails to load because looking for proj.db and Apache tells you Cannot find proj.db. I could be wrong but the file should be in C:\OSGeo4W64\share\proj (if not find it and change path to it directory to defined PROJ_LIB)

PROJ_LIB environment variable is the way to tell where to look for projections definitions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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