<!DOCTYPE html><html><head><title></title><style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div>Hi,<br></div><div><br></div><div>The following 3 lines should all be in your LAYER...END block (and replacing the current DATA line):<br></div><div><br></div><div> CONNECTIONTYPE postgis <br></div><div> CONNECTION "user=postgres password=StrongAdminP@ssw0rd dbname=news_test_shp host=127.0.0.1 port=5432"<br></div><div> DATA "geom from sample.admintable using unique gid using srid=9000913"<br></div><div><br></div><div><br></div><div>Seth<br></div><div id="sig62266145"><div class="signature">--<br></div><div class="signature">web:<a href="https://geographika.net">https://geographika.net</a><br></div><div class="signature">twitter: @geographika<br></div></div><div><br></div><div><br></div><div>On Mon, Mar 28, 2022, at 8:29 PM, Jeremy JK wrote:<br></div><blockquote type="cite" id="qt" style=""><div dir="ltr"><div>Hello all,<br></div><div>On my virtualbox linuxmint machine I can view a shp file with MapServer when the shp file is on filesystem.<br></div><div>When I put it into the database, the browser returns an error message<br></div><div>but ogrinfo program can read the database well.<br></div><div>See below <br></div><div><br></div><div>And thanks for your assistance <br></div><div>J<br></div><div><div><br></div><div><b>Error</b>: <span style="color:rgb(0, 0, 0);"><span class="font" style="font-family:"Times New Roman";"><span class="size" style="font-size:medium;">msLoadMap(): Unknown identifier. Parsing error near (CONNECTIONTYPE):(line 9)</span></span></span><br></div><div><span style="color:rgb(0, 0, 0);"><span class="font" style="font-family:"Times New Roman";"><span class="size" style="font-size:medium;"><b>Petition</b>: </span></span></span><a href="http://localhost:8080/cgi-bin/mapserv?map=/opt/mapfile/mapserver_quickstart.map&SERVICE=WMS&REQUEST=Getmap&VERSION=1.1.1&LAYERS=Countries&SRS=EPSG:4326&BBOX=-137,29,-53,88&FORMAT=PNG&WIDTH=800&HEIGHT=600">http://localhost:8080/cgi-bin/mapserv?map=/opt/mapfile/mapserver_quickstart.map&SERVICE=WMS&REQUEST=Getmap&VERSION=1.1.1&LAYERS=Countries&SRS=EPSG:4326&BBOX=-137,29,-53,88&FORMAT=PNG&WIDTH=800&HEIGHT=600</a><br></div><div><br></div><div><br></div><div><div><b>ogrinfo </b>PG:"host=127.0.0.1 user=postgres password=StrongAdminP@ssw0rd dbname=news_test_shp port=5432" sample.admintable -summary<br></div><div>INFO: Open of `PG:host=127.0.0.1 user=postgres password=StrongAdminP@ssw0rd dbname=news_test_shp port=5432'<br></div><div> using driver `PostgreSQL' successful.<br></div><div><br></div><div>Layer name: sample.admintable<br></div><div>Geometry: Multi Polygon<br></div><div>Feature Count: 258<br></div><div>Extent: (-180.000000, -90.000000) - (180.000000, 83.634101)<br></div><div>Layer SRS WKT:<br></div><div>GEOGCRS["WGS 84",<br></div><div> DATUM["World Geodetic System 1984",<br></div><div> ELLIPSOID["WGS 84",6378137,298.257223563,<br></div><div> LENGTHUNIT["metre",1]]],<br></div><div> PRIMEM["Greenwich",0,<br></div><div> ANGLEUNIT["degree",0.0174532925199433]],<br></div><div> CS[ellipsoidal,2],<br></div><div> AXIS["geodetic latitude (Lat)",north,<br></div><div> ORDER[1],<br></div><div> ANGLEUNIT["degree",0.0174532925199433]],<br></div><div> AXIS["geodetic longitude (Lon)",east,<br></div><div> ORDER[2],<br></div><div> ANGLEUNIT["degree",0.0174532925199433]],<br></div><div> ID["EPSG",4326]]<br></div><div>Data axis to CRS axis mapping: 2,1<br></div></div><div>...<br></div><div><br></div><div>+++++++++++++++++++++++++++++++++++++++++++++++++++<br></div><div><div><b>MAP</b><br></div><div> NAME "MAPSERVER_QUICKSTART"<br></div><div> EXTENT -137 29 -53 88<br></div><div> UNITS DD<br></div><div> SHAPEPATH "/opt/mapfile"<br></div><div> SIZE 800 600<br></div><div> <br></div><div> IMAGETYPE PNG24<br></div><div> CONNECTIONTYPE postgis <br></div><div> CONNECTION "user=postgres password=StrongAdminP@ssw0rd dbname=news_test_shp host=127.0.0.1 port=5432"<br></div><div> DATA "geom from sample.admintable using unique gid using srid=9000913"<br></div><div><br></div><div><br></div><div> PROJECTION<br></div><div> "init=epsg:4326"<br></div><div> END<br></div><div><br></div><div> WEB<br></div><div> METADATA<br></div><div> ows_title "MapServer Quickstart"<br></div><div> ows_enable_request "*"<br></div><div> ows_srs "EPSG:4326 EPSG:25832 EPSG:25833"<br></div><div> END<br></div><div> END<br></div><div><br></div><div> LAYER<br></div><div> NAME "Countries"<br></div><div> STATUS ON<br></div><div> TYPE POLYGON<br></div><div> DATA "ne_10m_admin_0_countries"<br></div><div> CLASS<br></div><div> STYLE<br></div><div> COLOR 246 241 223<br></div><div> OUTLINECOLOR 0 0 0<br></div><div> END<br></div><div> END<br></div><div> END<br></div><div><br></div><div>END<br></div></div><div>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++<br></div></div></div><div>_______________________________________________<br></div><div>MapServer-users mailing list<br></div><div><a href="mailto:MapServer-users@lists.osgeo.org">MapServer-users@lists.osgeo.org</a><br></div><div><a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br></div><div><br></div></blockquote><div><br></div></body></html>