INCLUDE and php-mapscript ?

Daniel Morissette dmorissette at MAPGEARS.COM
Thu Jul 5 13:18:54 EDT 2007


Do you use a relative path or an absolute path for your include 
statement in the main mapfile? Just trying to rule out the possibility 
of a problem related to the way relative paths are handled by PHP 
MapScript vs the include directive.

Daniel



Attila Csipa wrote:
> Has anyone tried to use a .map file with INCLUDE statements from 
> php-mapscript ? I'm getting the following error:
> 
> Warning: [MapServer Error]: loadLayer(): in /var/www/ka-map/htdocs/init.php on 
> line 113
> Warning: Failed to open map file /var/www/mapdata/data3/6.map 
> in /var/www/map/htdocs/init.php on line 113
> 
> the "INCLUDE /var/www/mapdata/common/circles.map" is a list of CLASS 
> statements which are inside a LAYER
> 
> CLASS
> 	NAME "Your Circle"
> 	EXPRESSION ([itemid] = 6)
> 	SYMBOL 'circle'
> 	MINSCALE 75000
> 	MAXSIZE 20
> 	MINSIZE 10
> 	COLOR 0 0 0
> END
> 
> the odd thing is that it does work if I just copy/paste the contents of the 
> include file, and it works correctly WITH the include if called from shp2img. 
> All of this with Mapserver 4.10.2.


-- 
Daniel Morissette
http://www.mapgears.com/



More information about the mapserver-dev mailing list