<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Message</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16735" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=956011913-23102008><FONT face=Arial color=#0000ff
size=2>Valerio, </FONT></SPAN></DIV>
<DIV><SPAN class=956011913-23102008><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=956011913-23102008><FONT face=Arial color=#0000ff size=2>I
think that most people just set up a cron job or a scheduled job on their server
to delete all of the temporary images at some periodic interval. (e.g.
24hrs, 12hrs, 1hr) Your interfval would depend on the number of images
that you are generating, disk space, etc.</FONT></SPAN></DIV>
<DIV><SPAN class=956011913-23102008><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=956011913-23102008><FONT face=Arial color=#0000ff size=2>In the
code that you use to delete the files, you may want to look at the timestamps on
the images and only delete images that are at least 1 minute old, so you don't
accidentally delete an image before it can be used by the page that called
it.</FONT></SPAN></DIV>
<DIV><SPAN class=956011913-23102008><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=956011913-23102008><FONT face=Arial color=#0000ff
size=2>David.</FONT></SPAN></DIV>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B>
mapserver-users-bounces@lists.osgeo.org
[mailto:mapserver-users-bounces@lists.osgeo.org] <B>On Behalf Of </B>valerio
vianello<BR><B>Sent:</B> Thursday, October 23, 2008 6:06 AM<BR><B>To:</B>
'mapserver'; Venkat Rao Tammineni<BR><B>Subject:</B> RE: [mapserver-users]
disk space<BR><BR></FONT></DIV>
<TABLE cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD vAlign=top>Thanks for the quick reply,<BR><BR>When you run this
function? after each requests ? but if so, the client is able to read
the image before you delete it ?<BR><BR>best
regards,<BR><BR>Valerio<BR><BR><BR>--- <B>Gio 23/10/08, Venkat Rao
Tammineni <I><vtammineni@roulacglobal.com></I></B> ha scritto:<BR>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid">Da:
Venkat Rao Tammineni <vtammineni@roulacglobal.com><BR>Oggetto:
RE: [mapserver-users] disk space<BR>A: valerio.vianello@yahoo.it,
"'mapserver'" <mapserver-users@lists.osgeo.org><BR>Data: Giovedì
23 ottobre 2008, 13:05<BR><BR>
<DIV id=yiv1232889979>
<STYLE>UNKNOWN {
FONT-FAMILY: Calibri; panose-1: 2 15 5 2 2 2 4 3 2 4
}
UNKNOWN {
FONT-FAMILY: Tahoma; panose-1: 2 11 6 4 3 5 4 4 2 4
}
#yiv1232889979 #yiv1232889979 P.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman", "serif"
}
#yiv1232889979 LI.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman", "serif"
}
#yiv1232889979 DIV.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman", "serif"
}
#yiv1232889979 A:link {
COLOR: blue; TEXT-DECORATION: underline
}
#yiv1232889979 SPAN.MsoHyperlink {
COLOR: blue; TEXT-DECORATION: underline
}
#yiv1232889979 A:visited {
COLOR: purple; TEXT-DECORATION: underline
}
#yiv1232889979 SPAN.MsoHyperlinkFollowed {
COLOR: purple; TEXT-DECORATION: underline
}
#yiv1232889979 SPAN.EmailStyle17 {
COLOR: #1f497d; FONT-FAMILY: "Calibri", "sans-serif"
}
#yiv1232889979 .MsoChpDefault {
}
UNKNOWN {
MARGIN: 1in
}
#yiv1232889979 DIV.Section1 {
}
</STYLE>
<DIV class=Section1>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 11pt; COLOR: rgb(31,73,125); FONT-FAMILY: 'Calibri','sans-serif'">Hi,</SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 11pt; COLOR: rgb(31,73,125); FONT-FAMILY: 'Calibri','sans-serif'"></SPAN> </P>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 11pt; COLOR: rgb(31,73,125); FONT-FAMILY: 'Calibri','sans-serif'">
Why don’t you write method for deleting png .mapserver will take
care about creating an image.I have C# code.</SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 11pt; COLOR: rgb(31,73,125); FONT-FAMILY: 'Calibri','sans-serif'">The
below code will delete all the files form OutputDIR.</SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 11pt; COLOR: rgb(31,73,125); FONT-FAMILY: 'Calibri','sans-serif'"></SPAN> </P>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 11pt; COLOR: rgb(31,73,125); FONT-FAMILY: 'Calibri','sans-serif'">I
hope it helps you. Or At least you can get some idea about your
task.</SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 11pt; COLOR: rgb(31,73,125); FONT-FAMILY: 'Calibri','sans-serif'"></SPAN> </P>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 11pt; COLOR: rgb(31,73,125); FONT-FAMILY: 'Calibri','sans-serif'">Thanks
and Regards</SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 11pt; COLOR: rgb(31,73,125); FONT-FAMILY: 'Calibri','sans-serif'">Venkat.</SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 11pt; COLOR: rgb(31,73,125); FONT-FAMILY: 'Calibri','sans-serif'"></SPAN> </P>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">public</SPAN><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"> <SPAN
style="COLOR: blue">void</SPAN> Deleteimages()</SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">{</SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
<SPAN style="COLOR: blue">try</SPAN></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
{</SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
<SPAN style="COLOR: blue">foreach</SPAN> (<SPAN
style="COLOR: blue">string</SPAN> f <SPAN
style="COLOR: blue">in</SPAN> System.IO.<SPAN
style="COLOR: teal">Directory</SPAN>.GetFiles(OutputDir))</SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
{</SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
System.IO.<SPAN style="COLOR: teal">File</SPAN>.Delete(f);</SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
}</SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
}</SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
<SPAN style="COLOR: blue">catch</SPAN> (<SPAN
style="COLOR: teal">Exception</SPAN> exp)</SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
{ }</SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">}</SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 11pt; COLOR: rgb(31,73,125); FONT-FAMILY: 'Calibri','sans-serif'"></SPAN> </P>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 11pt; COLOR: rgb(31,73,125); FONT-FAMILY: 'Calibri','sans-serif'"></SPAN> </P>
<DIV
style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: rgb(181,196,223) 1pt solid; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; BORDER-LEFT: medium none; PADDING-TOP: 3pt; BORDER-BOTTOM: medium none">
<P class=MsoNormal><B><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Tahoma','sans-serif'">From:</SPAN></B><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Tahoma','sans-serif'">
mapserver-users-bounces@lists.osgeo.org
[mailto:mapserver-users-bounces@lists.osgeo.org] <B>On Behalf Of
</B>valerio vianello<BR><B>Sent:</B> Thursday, October 23, 2008 4:25
PM<BR><B>To:</B> mapserver<BR><B>Subject:</B> [mapserver-users] disk
space</SPAN></P></DIV>
<P class=MsoNormal> </P>
<TABLE class=MsoNormalTable cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD
style="PADDING-RIGHT: 0in; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; PADDING-TOP: 0in"
vAlign=top>
<P class=MsoNormal style="MARGIN-BOTTOM: 12pt">Dear
all,<BR><BR>I have a demo where I'm using mapserver cgi
interface. I'm using the browse mode so each time mapserver
receive a request, it creates a temporary png on the server
filesystem. <BR><BR>Do you know how and when i can delete those
temporary image since they are used only one time ?
<BR><BR>An attacker could easily fill all the server
HD locking all the
system.<BR><BR>Thanks<BR><BR>Valerio</P></TD></TR></TBODY></TABLE>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Calibri','sans-serif'"></SPAN> </P>
<DIV class=MsoNormal style="TEXT-ALIGN: center" align=center><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Calibri','sans-serif'">
<HR align=center width="100%" SIZE=1>
</SPAN></DIV>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">Scopri il
<A
href="http://us.rd.yahoo.com/mail/it/taglines/yahoo/ymail/SIG=11djrg460/**http%3A%2F%2Fwww.ymailblogit.com%2Fblog%2F"
target=_blank rel=nofollow>Blog di Yahoo! Mail</A>: trucchi, novità,
consigli... e scrivi la tua opinione!</SPAN><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Calibri','sans-serif'"></SPAN></P></DIV></DIV></BLOCKQUOTE></TD></TR></TBODY></TABLE><BR>
<HR SIZE=1>
<FONT face=Arial size=2>Scopri il <A
href="http://us.rd.yahoo.com/mail/it/taglines/yahoo/ymail/SIG=11djrg460/**http%3A%2F%2Fwww.ymailblogit.com%2Fblog%2F">Blog
di Yahoo! Mail</A>: trucchi, novità, consigli... e scrivi la tua
opinione!</FONT></BLOCKQUOTE></BODY></HTML>