I think I have a misconfiguration in my mapserver that is preventing it from serving up imagery.

In my map file, I have this section:


If I leave that section in, I get this error when calling GetMap or even GetCapabilities:

msProcessProjection(): Projection library error. no system list, errno: 2

If I remove that section (not desirable), GetCapabilities works, but GetMap gives this error:

<ServiceExceptionReport version="1.1.1">
    <ServiceException code="InvalidSRS">msWMSLoadGetMapParams(): WMS server error. Cannot set new SRS on a map that doesn&#39;t have any projection set. Please make sure your mapfile has a projection defined at the top level.</ServiceException>

Which is expected because I just removed the section.

So, my question is how do I debug the error: msProcessProjection(): Projection library error. no system list, errno: 2?

Searching online, I see comments related to permissions, but apache (user running httpd) can access the following directories defined in my httpd.conf:

SetEnv LD_LIBRARY_PATH /some/place/lib/
SetEnv PROJ_LIB /some/place/share/proj/
SetEnv GDAL_DATA /some/place/share/gdal/
SetEnv GEOTIFF_CSV /some/place/share/gdal/

In /some/place/share/proj, there is a file epsg that is as I expect.

I get no errors from apache.


You can run the mapserv program directly from the command line (use su to switch to the apache user first) - running it through strace should help determine how libraries are being loaded and functions are being called.

You should set your specific environment variables manually before invoking mapserv to properly reflect your Apache configuration.

Also, you can set other enviroment variables to simulate running as a CGI script:


QUERY_STRING is going to be useful.


A couple of thoughts. It is somewhat difficult to diagnose this without looking at your mapfile, but here goes:

  1. You should try setting your PROJ_LIB variable to /some/place/share/proj/nad/ That is where the epsg file should be located.

  2. Enable debugging. Set it to level 5. You will need to set up an error log file too. See more info her in the MapServer docs http://mapserver.org/mapfile/map.html

I am guessing that either the path to the epsg database is wrong or your user doesn't have rights to read it.

I this isn't the problem, I would look at whether you have set all of the layer and map level metadata in your MapFile that is necessary to serve as a WMS server. More info here: http://mapserver.org/ogc/wms_server.html Make sure that you have set a valid SRS/CRS in your WMS metadata.


I just ran into this issue and found that the problem was because I had not installed the ‘proj-epsg’ package.

yum install proj-epsg

To read More on WMS Errors and other common errors follow the link below;

http://mapserver.org/errors.html#msprocessprojection-no-such-file-or-directory (By the way, following this method worked for me)



  • Welcome to GIS SE! In this instance I think a specific error message is being asked about, but you have provided generic advice as part of a more or less link-only answer. Consequently, I recommend that you edit your answer to explain how to address the specific error that is being asked about. – PolyGeo Oct 24 '14 at 6:50
  • I had the same problem earlier, and by using the method in the first link I provided, to specify the location for the project library in the map file and by Setting the environment variable through my web server in httpd.conf file of my Apache installation, I was able to get around the problem. So that's why I provided the link to the solution and where I found it. – user28864 Oct 26 '14 at 6:20
  • That's fine to do as long as you also provide that context/explanation rather than just the links. I recommend you edit your answer to copy/paste from your comment into your answer, with a quick tidy up of it. The idea is that subsequent visitors with the same problem will have a fair idea of how to solve it just by reading your answer, even if the links end up breaking at some point in the future. Thanks for taking the time to answer. – PolyGeo Oct 26 '14 at 6:25

Your Answer

