Ticket #814 (closed defect: fixed)

Opened 9 years ago

Last modified 9 years ago

Shapefile named "units" causes MapServer to crash

Reported by: keon@… Owned by: mapserverbugs
Priority: high Milestone:
Component: MapScript-PHP Version: 4.2
Severity: normal Keywords:
Cc:

Description

Not sure if this is a bug or just a reserved keyword problem, but I am unable to
use a shapefile named "units" until I change its name.  After naming it
"hunits", it worked.

Here's the error I receive:

[Wed Aug 11 15:59:27 2004] [error] [client w.x.y.z] PHP Warning:  [MapServer
Error]: getString(): Parsing error near (units):(line 258), referer: 
[Wed Aug 11 15:59:27 2004] [error] [client w.x.y.z]  in
/www/htdocs/test/main.php on line 48, referer: 
[Wed Aug 11 15:59:27 2004] [error] [client w.x.y.z] PHP Warning:  Failed to open
map file /www/mapfiles/test.map in /www/htdocs/test/main.php on line 48, referer: 
[Wed Aug 11 15:59:27 2004] [error] [client w.x.y.z] PHP Fatal error:  Call to a
member function on a non-object in /www/htdocs/test/main.php on line 109, referer:

Change History

Changed 9 years ago by dmorissette

You probably need to add quotes around the value "units" to tell the parser that
it´s a string and not the identifier UNITS:

 LAYER
   ...
   DATA "units"
   ...
 END

If you already had quotes then we´ll need a copy of your mapfile to reproduce this.

Changed 9 years ago by keon@…

  • status changed from new to closed
  • resolution set to fixed
Oops, I should have thought of that.  Yes, adding quotes fixed it.  Thanks Daniel.
Note: See TracTickets for help on using tickets.