<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3157" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=558410823-04092007><FONT face=Arial size=2>Hi everyone, I have 
a problem&nbsp;generating an image from my postgis database&nbsp; I have 
attached my php script.&nbsp; No errors are returned when the script is run, 
just a blank image is returned.&nbsp; Can anyone see whats wrong with my 
script?&nbsp; Cheers</FONT></SPAN></DIV>
<DIV><SPAN class=558410823-04092007><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=558410823-04092007><FONT face=Arial 
size=2>bm</FONT></SPAN></DIV>
<DIV><SPAN class=558410823-04092007><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=558410823-04092007><FONT face=Arial 
size=2>&lt;php-script_start&gt;</FONT></SPAN></DIV>
<DIV><SPAN class=558410823-04092007><FONT face=Arial 
size=1></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=558410823-04092007><FONT face=Arial size=1>$map = 
ms_newMapObj("");<BR>$map-&gt;setSize(600, 300);<BR>$temp = 
$map-&gt;setExtent(-180, -90, 180, 90);</FONT></SPAN></DIV>
<DIV><FONT face=Arial size=1></FONT>&nbsp;</DIV>
<DIV><SPAN class=558410823-04092007><FONT face=Arial size=1>//define path where 
to creat image<BR>$map-&gt;web-&gt;set("imagepath", 
"./data/");<BR>$map-&gt;web-&gt;set("imageurl", 
"./data/");<BR>$map-&gt;web-&gt;set("log", 
"./data/logfile.txt");</FONT></SPAN></DIV>
<DIV><FONT face=Arial size=1></FONT>&nbsp;</DIV>
<DIV><SPAN class=558410823-04092007><FONT face=Arial size=1>//crate parcel 
layer, associate it withthe map<BR>$parcelLayer = 
ms_newLayerObj($map);<BR>$parcelLayer-&gt;set("connectiontype", 
MS_POSTGIS);<BR>$parcelLayer-&gt;set("name", "parcels 
layer");</FONT></SPAN></DIV>
<DIV><FONT face=Arial size=1></FONT>&nbsp;</DIV>
<DIV><SPAN class=558410823-04092007><FONT face=Arial size=1>$connector = 
"user=username dbname=test 
host=localhost";<BR>$parcelLayer-&gt;set("connection", 
$connector);</FONT></SPAN></DIV>
<DIV><FONT face=Arial size=1></FONT>&nbsp;</DIV>
<DIV><SPAN class=558410823-04092007><FONT face=Arial size=1>$sql = "the_geom 
from parcels";<BR>$parcelLayer-&gt;set("data", $sql);</FONT></SPAN></DIV>
<DIV><FONT face=Arial size=1></FONT>&nbsp;</DIV>
<DIV><SPAN class=558410823-04092007><FONT face=Arial 
size=1>$parcelLayer-&gt;set("status", 
MS_DEFAULT);<BR>$parcelLayer-&gt;set("type", 
MS_LAYER_POLYGON);<BR></FONT></SPAN></DIV>
<DIV><SPAN class=558410823-04092007><FONT face=Arial size=1>$parcelClass = 
ms_newClassObj($parcelLayer);<BR>$parcelClass-&gt;set("name", "parcels 
class");</FONT></SPAN></DIV>
<DIV><FONT face=Arial size=1></FONT>&nbsp;</DIV>
<DIV><SPAN class=558410823-04092007><FONT face=Arial><FONT size=1>$parcelStyle = 
ms_newStyleObj($parcelClass);<BR>$parcelStyle-&gt;color-&gt;setRGB( 250, 0, 
0);<BR>$parcelStyle-&gt;outlinecolor-&gt;setRGB( 255, 255, 
255);<BR></FONT></FONT></SPAN><SPAN class=558410823-04092007><FONT 
face=Arial><FONT size=1>$parcelStyle-&gt;set("symbolname", 
"circle");<BR>$parcelStyle-&gt;set("size", 
10);<BR></DIV></FONT></FONT></SPAN><SPAN class=558410823-04092007><FONT 
face=Arial size=2><SPAN class=558410823-04092007><FONT face=Arial 
size=2></FONT></SPAN></FONT></SPAN>
<DIV><SPAN class=558410823-04092007><FONT face=Arial size=2><SPAN 
class=558410823-04092007><FONT face=Arial 
size=2>&lt;php-script_end&gt;</FONT></SPAN></FONT></SPAN></DIV>
<FONT face=Arial size=2>
<HR>
This e-mail message has been scanned for viruses by&nbsp;<FONT 
color=#ff8000><STRONG><FONT color=#400080>McAfee</FONT> </STRONG></FONT>and the 
content has been cleared by <STRONG><FONT color=#400080>MailMarshal</FONT> 
</STRONG>
<HR>
</FONT>
</BODY></HTML>