Opened 18 years ago

Last modified 15 years ago

#1770 new defect

WFS/OWS Path problem?

Reported by: warmerdam Owned by: dmorissette
Priority: high Milestone: 6.0 release
Component: WFS Server Version: unspecified
Severity: normal Keywords:
Cc: tmitchell

Description (last modified by warmerdam)

Frank

I'm running MapServer on Windows 2000 Professional. I found out that
msOWSBuildURLFilename() in mapows.c adds a backslash character.

See following snippet:

#ifdef _WIN32
        sprintf(pszBuf, "%s\\", pszPath);
#else
        sprintf(pszBuf, "%s/", pszPath);
#endif

I think this is what's messing things up. My mapfile works fine for WMS and
the GML file mentioned in the error message is being created in the
appropriate directory.

Is this a bug? If so, what's the work around? If not, what am I doing wrong?

Thanks!
JAB

----- Original Message ----- 
From: "Brown, Jeff (C2MS)" <jeffrey.brown@ngc.com>
To: <cropwithdawn@cox.net>
Sent: Friday, May 05, 2006 11:12 AM
Subject: For JAB: FW: [UMN_MAPSERVER-USERS] Why do I get this error message
when trying to access WFS?




-----Original Message-----
From: Frank Warmerdam [mailto:fwarmerdam@gmail.com] On Behalf Of Frank
Warmerdam
Sent: Friday, May 05, 2006 10:59 AM
To: Brown, Jeff (C2MS)
Cc: MAPSERVER-USERS@LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] Why do I get this error message when
trying to access WFS?

Brown, Jeff (C2MS) wrote:
> > I get the following error message when I try to access my WFS
resource:
> > msOGRFileOpen(): OGR error. Open failed for OGR connection
> > `/ms4w/tmp/ms_tmp/\7bb0d77657833c3f75a5de7149b5572f.tmp.gml'. File not

> > found or unsupported format.

Jeff,

It looks like an extra "\" is getting inserted in the path somehow.
You might want to check your temporary file path in the WEB object.
Perhaps it is in there?  Or perhaps you will need to drop the trailing
forward slash from there (though that might cause other problems).

Attachments (1)

test.map (873 bytes ) - added by jmckenna 16 years ago.
tiny test mapfile for reproducing problem

Download all attachments as: .zip

Change History (8)

comment:1 by assefa, 18 years ago

looking into this

comment:2 by assefa, 18 years ago

couple of things :

I have changed the string concatenation logic to validate the last character
before appending the slash.
But that does not seem to solve the issue with opening a gml file using a path
like this /tmp/ms_tmp/name_of_the_gml.gml.  If I use for the same file a path
using the drive c:/tmp/ms_tmp/name_of_the_gml.gml, It will work.
 
This is reproducable by using a simple map layer with an ogr connection (
CONNECTION "/tmp/ms_tmp/3b858489ab10fc43f236141857205a64.tmp.gml").  

Looking into the debugger, the 'error' seems to come from function 
GMLFeature *GMLReader::NextFeature() when calling !m_poSAXReader->parseFirst.  I
could not debug further in that code (for soem reason the debgger exits at that
point).

Note that using ogr with  shape files without a drive specified works ok.

Note sure if this is a new or It has always been like this and was just visible
because of the ms4w default map settings.  
 
   

comment:3 by fwarmerdam, 18 years ago

Cc: mapserver-bugs@… added
Milestone: 4.10 release
Owner: changed from mapserverbugs to fwarmerdam
I'll try and look into this. 

comment:4 by warmerdam, 17 years ago

Description: modified (diff)
Resolution: worksforme
Status: newclosed

I don't have any information to reproduce this nor do I recall anything about this even though it appears I was the original reporter.

Closing.

comment:5 by jmckenna, 16 years ago

Cc: tmitchell added
Milestone: 5.0 release5.2.1 release
Resolution: worksforme
Status: closedreopened

Assefa, this problem still exists. In fact we've been hitting this for a few years with the MapServer workshop at FOSS4G (we would avoid WFS because of this). I get the same results with MS4W 2.2.9 as your comment:2 using a WFS-client layer:

  • reproducable with simple OGR connection without the drive letter using shp2img and CGI test app (CONNECTION "/tmp/ms_tmp/3b858489ab10fc43f236141857205a64.tmp.gml")
  • adding the drive letter to IMAGEPATH (in both mapfile and CGI variable) solves it

I think this is a bug.

by jmckenna, 16 years ago

Attachment: test.map added

tiny test mapfile for reproducing problem

comment:6 by jmckenna, 16 years ago

sorry from re-reading bug it seems Assefa confirmed this bug before and passed it to Frank. Frank let me know if you need anything to reproduce. Easiest method: take that small test.map and run it with shp2img.

comment:7 by dmorissette, 15 years ago

Milestone: 5.6 release6.0 release
Owner: changed from warmerdam to dmorissette
Status: reopenednew
Note: See TracTickets for help on using tickets.