Thanks for your answer mates!<br>I have used the $map-&gt;save(&quot;/tmp/test.map&quot;) to debug the mapfile, and i discovered that the error was a wrong parsing of the $data_path.<br>Thanks for the save function, it's very usefull for debugging mapscript application!
<br><br>Bye<br>Luca<br><br><div><span class="gmail_quote">On 10/28/06, <b class="gmail_sendername">Gregor Mosheh</b> &lt;<a href="mailto:gregor@hostgis.com">gregor@hostgis.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
&gt; Luca Casagrande wrote:<br>&gt;&gt; I am trying to update the value DATA of a layer called visibility, using<br>&gt;&gt; php mapscript; those are the lines i am testing:<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; $this_layer = $map-&gt;getLayerByName('visibility');
<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; $this_layer-&gt;set('data', $data_path );<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; $this_layer-&gt;set('status', MS_ON);<br><br>A month or two ago, I did this same trick (on the fly datasets, very cool)<br>and it worked A-OK. It worked, rather, after 2 days of frustration until I
<br>found out that I had a typo in $data_path and was specifying the wrong<br>dataset for the layer! My symptom was exactly the same as yours: It only<br>works if I hardcode the data path, but not if I set it from the program.
<br><br>So, do double check that $data_path is being set properly, and try<br>Daniel's idea of dumping the mapfile to disk and examining the generated<br>values.<br></blockquote></div><br>