Warning: Failed to open map file
Shashi Gireddy
gireddy at GMAIL.COM
Sun Jul 17 00:28:17 PDT 2005
I installed ms4w on my windows xp (professional & home both)
machienes. I had a simple program to display a map, It was working
fine on Linux, When I tested on windows it is giving me following
error.
Warning: [MapServer Error]: msLoadMap(): (C:\ms4w
mp\ms_tmp\Newcounty.map) in C:\ms4w\apps\maps\map1.php on line 15
Warning: Failed to open map file C:\ms4w mp\ms_tmp\Newcounty.map in
C:\ms4w\apps\maps\map1.php on line 15
Fatal error: Call to a member function on a non-object in
C:\ms4w\apps\maps\map1.php on line 160
I thought it was a windows security issue, I granted "full control"
permission to almost every available user on the advanced tab. It
seems it is not a security issue.
can any body help me.
here is the map file
MAP
NAME FIRSTMAP
SIZE 500 500
STATUS ON
SYMBOLSET "c:\ms\symbols\symbols35.sym"
EXTENT -98.54 29.26 -96.35 27.15
UNITS MILES
SHAPEPATH "c:\ms\data\"
WEB
IMAGEPATH "C:\ms4w\tmp\ms_tmp"
IMAGEURL "http://localhost/ms_tmp/"
END
END
and here is a part of the code
dl('php_mapscript_44.dll');
$test = $HTTP_SESSION_VARS["test"];
//$map_path="C:\ms4w\tmp\ms_tmp\";
// $map_file="Newcounty.map";
//$map = ms_newMapObj($map_path.$map_file);
$map = ms_newMapObj("C:\ms4w\tmp\ms_tmp\Newcounty.map");
// $map_path="/home/census/WWW/ms/map_files/";
// $map_file="Newcounty.map";
//$map = ms_newMapObj($map_path.$map_file);
$map->{name} = 'Test';
$map->{status} = MS_ON;
$map->{interlace} = MS_OFF;
$map->{transparent} = MS_OFF;
....
$layer = ms_newLayerObj($map);
$layer->set(name,"Surface_Type");
$layer->set(type,MS_LAYER_LINE);
$layer->set(status,MS_ON);
$layer->set(data,"Surface_Type");
$layer->set(tolerance,10);
$layer->set(classitem,"SURFACETYP");
$layer->set(transparency, 90);
$layer->set(labelitem,"HWY");
$prm="SURFACETYP";
$pop_undr_1500 = ms_newClassObj($layer);
$pop_undr_1500->set(status, MS_ON);
$pop_undr_1500->set(name, "51");
$pop_undr_1500->setexpression('([SURFACETYP]==51)');
// create style
$style = ms_newStyleObj($pop_undr_1500);
$style->color->setRGB(255, 185, 215);
$style->outlinecolor->setRGB(0, 0, 0);
Thanks alot in advance.
thank you,
shashi.
--
Shashi Kiran Reddy. Gireddy,
Graduate Assistant,
CBER, University of Alabama.
http://www.cs.ua.edu/shashi
Home: 205-752-5137 Cell: 205-657-1438
More information about the MapServer-users
mailing list