[Mapserver-users] basic PHP mapscript config

Eric Hillmuth ehillmuth at digitalmeridian.net
Wed Feb 26 12:43:12 EST 2003


I'm trying to set up PHP mapscript (the 3.7 build from DM Solutions)  
with Apache on an NT box. I'm following the howto at:

http://mapserver.gis.umn.edu/doc/phpmapscript-byexample-howto.html
 <http://mapserver.gis.umn.edu/doc/phpmapscript-byexample-howto.html>

Unfortunately I keep getting this php error:

Parse error: parse error, unexpected T_VARIABLE in
C:\Progra~1\oracle\ora81\Apache\Apache\htdocs\mapserver\Index.php on 
line 5

My php file looks like this:

        <?php
        dl('php_mapscript_37.dll');

        $map_path="C:\Program
        Files\Oracle\ora81\Apache\Apache\htdocs\MapServer\";
        $map = ms_newMapObj("$map_path.UPgeneral.map");


        $image=$map->draw();
        $image_url=$image->saveWebImage(MS_PNG,1,1,0);


        ?>

        <HTML>
        <HEAD>
        <TITLE>Example 1: Displaying a map</TITLE>
        </HEAD>
        <BODY>
        <IMG SRC=<?php echo $image_url; ?> >
        test
        </BODY>
        </HTML>

And my mapfile looks like this

NAME UPGeneral
SIZE 400 400
STATUS ON
SYMBOLSET ./Symbols/Symbols.sym
EXTENT 2935998 1144674 3315772 1376879
UNITS FEET
SHAPEPATH "\Shape\"
	
WEB
	IMAGEPATH "/MapServer/ImageTemp"
	IMAGEURL "/MapServer/"
END

LAYER
	NAME PLSS Sections
	TYPE POLYGON
	STATUS ON
	DATA Sections
	CLASS
		COLOR 110 50 100
		OUTLINECOLOR 200 200 200
	END
END

END

Any thoughts would be appreciated. <http://mapserver.gis.umn.edu/doc/phpmapscript-byexample-howto.html>

-- 
Eric 





More information about the mapserver-users mailing list