<html>
<head>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<meta name=Generator content="Microsoft Word 10 (filtered)">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:blue;
text-decoration:underline;}
span.EmailStyle17
{font-family:Arial;
color:navy;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=blue>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Your image link in http is a direct link
to your hard drive. I do not think your web server likes this. The ms_tmp
directory has to be readable by apache, and therefore, it must be in the apache
htdocs path, or specified in the httpd.conf file to be readable.</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>HTH,</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>r.b.</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>
<div>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Robert W. Burgholzer</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Surface Water Modeler</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Office of Water Supply and Planning</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Virginia Department of Environmental
Quality</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><a
href="mailto:rwburgholzer@deq.virginia.gov">rwburgholzer@deq.virginia.gov</a></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>804-698-4405</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Open Source Modeling Tools:</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><a
href="http://sourceforge.net/projects/npsource/">http://sourceforge.net/projects/npsource/</a></span></font></p>
</div>
<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma'>-----Original Message-----<br>
<b><span style='font-weight:bold'>From:</span></b>
mapserver-users-bounces@lists.osgeo.org [mailto:mapserver-users-bounces@lists.osgeo.org]
<b><span style='font-weight:bold'>On Behalf Of </span></b>Attila Borbás<br>
<b><span style='font-weight:bold'>Sent:</span></b> Wednesday, November 19, 2008
3:23 PM<br>
<b><span style='font-weight:bold'>To:</span></b>
mapserver-users@lists.osgeo.org<br>
<b><span style='font-weight:bold'>Subject:</span></b> [mapserver-users] The
browser can't display the rendered image</span></font></p>
<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'> </span></font></p>
<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>Hello,<br>
<br>
I still have got a problem. I ve tested my mapfiles (with quickmap.php) and
they work fine, but the problem is the same. My php/mapscript code created the
map image and saved it to "/ms_tmp/" but the browser couldn't display
it (I got a broken img). I enclose the php/mapscript file, the mapfile and the
page source.Thx for ur help and patience.<br>
<br>
PHP/MAPSCRIPT FILE:<br>
<br>
<?php<br>
define( "MAPFILE", "/ms4w/apps/raster/raster.map" );<br>
define( "MODULE", "php_mapscript.dll" );<br>
if(!extension_loaded("mapscript")) dl(MODULE);<br>
$oMap = ms_newMapObj( MAPFILE );<br>
//draw<br>
$oImage = $oMap->draw();<br>
//output map<br>
$url = $oImage->saveWebImage();<br>
?><br>
<HTML><br>
<HEAD><br>
<TITLE>Example 1: Displaying a
map</TITLE><br>
</HEAD><br>
<BODY><br>
<IMG SRC="<?php echo $url;
?>"><br>
</BODY><br>
</HTML><br>
<br>
MAPFILE (I created it with qgis):<br>
<br>
MAP<br>
NAME world_raster<br>
SIZE 600 600<br>
UNITS dd<br>
<br>
EXTENT -188.678212 -114.270312 189.321981 107.893344<br>
PROJECTION<br>
'proj=longlat'<br>
'ellps=WGS84'<br>
'datum=WGS84'<br>
'no_defs'<br>
''<br>
END<br>
<br>
IMAGECOLOR 192 192 192<br>
IMAGEQUALITY 95<br>
IMAGETYPE jpeg<br>
OUTPUTFORMAT<br>
NAME jpeg<br>
DRIVER 'GD/JPEG'<br>
MIMETYPE 'image/jpeg'<br>
#IMAGEMODE PC256<br>
EXTENSION 'jpeg'<br>
END<br>
LEGEND<br>
IMAGECOLOR 255 255 255<br>
STATUS ON<br>
KEYSIZE 18 12<br>
LABEL<br>
TYPE BITMAP<br>
SIZE MEDIUM<br>
COLOR 0 0 89<br>
END<br>
END<br>
<br>
<br>
WEB<br>
<br>
IMAGEPATH '/ms4w/tmp/ms_tmp/'<br>
IMAGEURL '/tmp/ms_tmp/'<br>
<br>
METADATA<br>
'wms_title'
'world_raster'<br>
'wms_onlineresource' '<a
href="http://my.host.com/cgi-bin/mapserv?map=wms.map&">http://my.host.com/cgi-bin/mapserv?map=wms.map&</a>'<br>
'wms_srs'
'EPSG:4326'<br>
END<br>
<br>
END<br>
<br>
LAYER<br>
NAME 'world_raster'<br>
TYPE RASTER<br>
DATA '/ms4w/Apache/htdocs/world_raster.tif'<br>
METADATA<br>
'wms_title' 'world_raster'<br>
END<br>
STATUS DEFAULT<br>
TRANSPARENCY 100<br>
PROJECTION<br>
'proj=longlat'<br>
'ellps=WGS84'<br>
'datum=WGS84'<br>
'no_defs'<br>
''<br>
END<br>
END<br>
<br>
END<br>
<br>
Page source (after I ran the code the html part saw the link to the image but
didn't display it.):<br>
<br>
<HTML><br>
<HEAD><br>
<TITLE>Example 1: Displaying a map</TITLE><br>
</HEAD><br>
<BODY><br>
<IMG SRC="c:/ms4w/tmp/ms_tmp/4923f091_c84_0.jpeg"><br>
</BODY><br>
</HTML></span></font></p>
</div>
</body>
</html>