[Mapserver-users] basic PHP mapscript config

daniel.berstein at dmapas.com daniel.berstein at dmapas.com
Wed Feb 26 12:41:53 PST 2003


You should use double backslashes for your path like:

$map_path="C:\\Program Files\\Oracle\\ora81\\Apache\\Apache\\htdocs\\MapServer\\";


Regards,

Daniel Berstein Z.
Jefe de Proyectos, dmapas.com
Eduardo Hyatt 583, Providencia, Santiago CHILE
*(56) (2) 222 22 60


-----Mensaje original-----
De:	Eric Hillmuth [SMTP:ehillmuth at digitalmeridian.net]
Enviado el:	Miercoles, 26 de Febrero de 2003 14:43
Para:	mapserver-users at lists.gis.umn.edu
Asunto:	[Mapserver-users] basic PHP mapscript config

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 


_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users




More information about the MapServer-users mailing list