Hi, How did you install Mapserver then? From OSGeo4W, from the gisinternals binaries, or by compiling by yourself? In any case it if not enough to locale the ogrinfo.exe but you must set the environment so that all the dependencies are found. You can use the setenv.bat from MS4W as an example:
@ECHO OFF REM Execute this file before running the GDAL, MapServer, and other commandline utilities. REM After executing this file you should be able REM to run the utilities from any commandline location. set PATH=C:\ms4w;C:\ms4w\Apache\cgi-bin;C:\ms4w\tools\gdal-ogr;C:\ms4w\tools\mapserv;C:\ms4w\tools\shapelib;C:\ms4w\proj\bin;C:\ms4w\tools\shp2tile;C:\ms4w\tools\shpdiff;C:\ms4w\tools\avce00;C:\ms4w\python\gdal;C:\ms4w\tools\php;C:\ms4w\tools\mapcache;C:\ms4w\tools\berkeley-db;C:\ms4w\tools\sqlite;C:\ms4w\tools\spatialite;C:\ms4w\tools\unixutils;C:\ms4w\tools\openssl;%PATH% echo GDAL, mapserv, and commandline MS4W tools path set set GDAL_DATA=C:\ms4w\gdaldata set GDAL_DRIVER_PATH=C:\ms4w\gdalplugins set PROJ_LIB=C:\ms4w\proj\nad set CURL_CA_BUNDLE=C:\ms4w\Apache\conf\ca-bundle\cacert.pem :ALL_DONE -Jukka Rahkonen- Lähettäjä: mapserver-users [mailto:[email protected]] Puolesta Vogt, Robert (RCIS) Lähetetty: 31. lokakuuta 2016 21:53 Vastaanottaja: 'Marco Afonso' <[email protected]>; mapserver <[email protected]> Aihe: Re: [mapserver-users] ogrinfo not recognized Thanks for the reply, I’m not using MS4w because of some restrictions I have. I did figure out that I needed to run ogrinfo like this though “.\ogrinfo” This at least launched ogrinfo however passing my connection string “MySQL:DatabaseName,host=Server,user=myUserName,password=myPassword,port=myPort” caused ogrinfo to crash…does the connection string look correct? Is there somewhere an error might have been written? Thanks for the help!! From: Marco Afonso [mailto:[email protected]] Sent: Monday, October 31, 2016 3:26 PM To: Vogt, Robert (RCIS); mapserver Subject: Re: [mapserver-users] ogrinfo not recognized Hello, If you are using MapSever for Windows (MS4W), first you need to run setenv.bat located in the ms4w directory. This will add libraries paths to windows enviroment variable. 2016-10-31 18:50 GMT+00:00 Vogt, Robert (RCIS) <[email protected]<mailto:[email protected]>>: I'm trying to test my connection string in ogrinfo. These are the steps I'm taking... 1. Open PowerShell as administrator 2. Navigate to directory where ogrinfo.exe is located 3. Enter command "ogrinfo MySQL:DatabaseName,host=Server,user=myUserName,password=myPassword,port=myPort" Then I receive an error stating "ogrinfo : The term 'ogrinfo' is not recognized as the name of a cmdlet" Not sure what I am doing wrong? _______________________________________________ mapserver-users mailing list [email protected]<mailto:[email protected]> http://lists.osgeo.org/mailman/listinfo/mapserver-users -- Regards, Marco Afonso http://goo.gl/ZDtQjm [Lähettäjä poisti kuvan.]
_______________________________________________ mapserver-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapserver-users
