Opened 12 years ago
Last modified 12 years ago
#4175 new defect
Mapserver 6.0.1 PostGIS connection String Corruption
Reported by: | tpingenot | Owned by: | sdlime |
---|---|---|---|
Priority: | normal | Milestone: | 6.0.2 release |
Component: | MapServer C Library | Version: | 6.0 |
Severity: | normal | Keywords: | postgis connection string |
Cc: | dmorissette, aboudreault |
Description
After upgrading from Mapserver 5.4 to 6.0.1 on linux with a custom build we found that including single quotes around dbname value in apostgis connection string causes an error. If you remove the single quotes it works. We have 20+ map files with 100+ layers with near identical setups that work fine with single quotes, so I'm not sure why it failed in this case, but the username and dbname were both 'interlocken'. Basic map file is attached.
MapServer Error: [Thu Feb 2 14:41:04 2012].823297 msPostGISLayerOpen(): Query error. Database connection failed (FATAL: no pg_hba.conf entry for host "[local]",user "interlocken", database "nterlocNken", SSL off ) with connect string 'dbname='nterlocNken' user='interlocken'
Map File Snippet
CONNECTIONTYPE postgis PROCESSING "CLOSE_CONNECTION=DEFER" CONNECTION "dbname='interlocken' user='interlocken' password=''" DATA 'the_geom FROM "ext_lighting_existing_point" USING UNIQUE gid USING srid=4326'
If you look in the postgres log file you see that the dbname getting submitted doesn't match, and so fails. Below is a line from the pg log file.
FATAL: no pg_hba.conf entry for host "[local]", user "interlocken", database "nterlocNken", SSL off
Attachments (1)
Change History (7)
by , 12 years ago
comment:1 by , 12 years ago
Cc: | added |
---|
comment:2 by , 12 years ago
Cc: | added; removed |
---|---|
Milestone: | FUTURE → 6.0.2 release |
ccing Daniel as I think he was also involved in escaping characters in strings (note that this might not be the issue at stake, but seems like a possible cause)
comment:3 by , 12 years ago
Cc: | added |
---|
comment:4 by , 12 years ago
comment:5 by , 12 years ago
aboudreault,
Sorry I just got your message, I have to wait for the sys admin to rebuild mapserver with the new version, I'll try and get him to do it and let you know, but it may be a few days or more.
comment:6 by , 12 years ago
Alright. The MapServer 6.0.2 has been released though, so you can try it directly.
Basic Map file with postgis layer