[mapserver-users] OGR error. Open failed for OGR connection
Graeme Watmuff
gwatmuff at geographicweb.com.au
Wed May 21 21:36:09 PDT 2008
Dear all,
I am encountering a problem with mapserver connecting to MySQL
Software installed:
gdal 1.5.1, mapserver 4.10.3 , mysql 5.1.24 on centos5
The error is:
msDrawMap(): Image handling error. Failed to draw layer named
'recentsurveysites'.
msOGRFileOpen(): OGR error. Open failed for OGR connection
`MySQL:dbname,user=usr,password=pwd,host=localhost,port=3306'. File
not found or unsupported format.
gdal was compiled with mysql support:
ogrinfo --formats
Supported Formats:
-> "ESRI Shapefile" (read/write)
-> "MapInfo File" (read/write)
-> "UK .NTF" (readonly)
-> "SDTS" (readonly)
-> "TIGER" (read/write)
-> "S57" (read/write)
-> "DGN" (read/write)
-> "VRT" (readonly)
-> "REC" (readonly)
-> "Memory" (read/write)
-> "BNA" (read/write)
-> "CSV" (read/write)
-> "GML" (read/write)
-> "GPX" (read/write)
-> "KML" (read/write)
-> "GeoJSON" (read/write)
-> "GMT" (read/write)
-> "SQLite" (read/write)
-> "ODBC" (read/write)
-> "PGeo" (readonly)
-> "MySQL" (read/write)
-> "AVCBin" (readonly)
I can connect from a command line shell:
ogrinfo MySQL:dbname,user=usr,password=pwd site -so
INFO: Open of `MySQL:dbname,user=usr,password=pwd
'
using driver `MySQL' successful.
Layer name: site
Geometry: Unknown (any)
Feature Count: 216056
Extent: (61.965278, -62.805556) - (167.987220, 34.751389)
Layer SRS WKT:
(unknown)
FID Column = SiteID
Geometry Column = geom
ObserverID: Integer (0.0)
ExistingSiteID: Integer (0.0)
ExistingObserverID: Integer (0.0)
Location: String (255.0)
LocationName: String (255.0)
State: Integer (0.0)
Distance: Real (10.4)
Direction: String (50.0)
Town: String (255.0)
Lat: Real (10.5)
Lon: Real (10.5)
Lat_in_secs: Integer (0.0)
Lon_in_secs: Integer (0.0)
PositionAccuracyID: Integer (0.0)
CoordMethodID: Integer (0.0)
DatumID: Integer (0.0)
TimeCreated: DateTime (0.0)
LastModified: DateTime (0.0)
But alas this mapserv under /var/www/cgi-bin, won't make the connection
to mysql? mapserver was compiled with ogr and gdal:
mapserv -v
MapServer version 4.10.3 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER
INPUT=EPPL7 INPUT=OGR INPUT=GDAL INPUT=MYGIS INPUT=SHAPEFILE
Has anyone worked this out?
Graeme
--
Graeme Watmuff
Geographic Web Solutions Pty Ltd
17 Tay Road
Woodforde
South Australia 5072
ph: + 61 8 83364463
More information about the MapServer-users
mailing list