You need to log in before you can comment on or make changes to this bug.
I installed ms4w yesterday on Windows XP Professional 2003. I downloaded the MapLab application and proceeded to run the 'Maplab 2.2 Getting Started' tutorial. When I got to 'Selecting the class item field' (MapEdit), at step 4, the map preview pane opened up, but instead of seeing the map, I got the following error messages: Warning: [MapServer Error]: msDrawMap(): Failed to draw layer named 'land_fn'. in C:\ms4w\apps\maplab-2.2\htdocs\mapedit\preview.php on line 469 Warning: [MapServer Error]: msDBFGetItemIndex(): Item 'CAPITAL' not found. in C:\ms4w\apps\maplab-2.2\htdocs\mapedit\preview.php on line 469 Warning: [MapServer Error]: msInsertHashTable: Invalid hash table or key in C:\ms4w\apps\maplab-2.2\htdocs\mapedit\preview.php on line 469 (above message 10 times!) Fatal error: Call to a member function on a non-object in C:\ms4w\apps\maplab- 2.2\htdocs\mapedit\preview.php on line 474 From the second error message, it seems to be related to trying to access the DBF field. I ran the tutorial to this point twice, just to ensure that I had not done something wrong prior! The only deviation to the instructions that I made was to key in 'popplace.shp' for the data field of the 'capital' layer object, as when I tried to select it using the browse button, the following string was returned, which did not reference the popplace.shp file correctly: ../../../../../../../..//maplab-2.2/tutorial/data/popplace By the way, my downloaded version of Maplab is 2.2, why is this not a choice in bugzilla bug reports? I had to choose either 2.0, 2.1 or 3.0. Thanks in advance!
Jeff, can you try to reproduce this?
trying now
i can duplicate your exact errors. note there are 2 bugs here: 1) the file browsers (every one i tried) for the mapfile parameters return invalid paths in the textbox (e.g. browse for a shapefile in a DATA parameter and see the returned path) 2) there seems to be a problem with adding a CLASSITEM. Any time i add a CLASSITEM, either to an existing layer (in tutorial.map) or to a new layer...the CLASSITEM will also get written to ANOTHER layer. I've attached the temp mapfile that MapLab is trying to load when we get the reported errors. Users add a new layer "capital", with a CLASSITEM and EXPRESSION...and taking a look at the temp mapfile you can see that the "land_fn" layer also mysteriously has the CLASSITEM and EXPRESSION...which causes the error.
Created an attachment (id=68) [details] temp mapfile
This appears to be fixed by changes in PHP 4.4.0. Not sure what the fix was but it is likely related to the reference problem fix described here: http://www.php.net/release_4_4_0.php Note that 4.4.0 breaks binary compatibility with 4.3.x. Please test on your platform. Do we have an MS4W which incorporates 4.4.0 yet?
PHP 4.4.0 solves this duplicate objects problem. A new MS4W (1.3.0) will be available shortly with this php version. However the file browser problem reported here still exists (as well as selecting a shape attribute browser). I'll file new bugs for these.
*** Bug 1005 has been marked as a duplicate of this bug. ***
opened bug#1183 for the path issue.
ms4w will be released shortly with a newer PHP5 version (5.1.6), and this bug is back (multiple classes ....)
it doesn't seem to happen with PHP 4.4.4 (which is included in this next release).
a reminder: PHP4 will not be supported in MS4W after this month, so these PHP5 problems are critical.
we're gonna have to live with this for a bit - i painfully just tried a "php 5.2-dev snapshot".....i get scarey multithreaded errors for php_mapscript. I now have a big headache. sorry, i tried.