Hi, I've written a file upload script for a simple Content Managment System I writing. It's pretty normal stuff, CGI.pm, strict and warnings. All works okay except that my temp folder is filling up with CGItempXXXX files.

At the moment the script is running as a mod_Perl 1.26_01-dev PerlRun script on my Apache 1.3.20/NT4 box. I'm running Perl 5.6.1 ActiveState build 628, and my CGI.pm is version 2.78.

I assume that as CGI.pm is loaded once into mod_Perl on start, rather than per CGI call, then, it's normal temp file destruction is failing to happen. As far as I can tell stopping and starting Apache does not delete the files either, though it does free any locks on them.

I'm well aware that NT isn't the best possible platform, and that PerlRun is a bit of a hack for those of us not able to use mod_Perl "properly", but it's a bit annoying watching your temp folder fill up with files.

Anyone else seen this?

Is file upload not a wise thing to run under mod_Perl/PerlRun?

I know when the script runs under CGI it's all okay.

I checked SuperSearch, but as CGI, upload and mod_Perl are very common, it was hard to find anything useful from the very large number of hits returned.

As ever humble thanks in advance.

P.S. This is my 50th post. Thanks to everyone for all the answers I've had in the past, they've been very helpful.


In reply to CGI.pm uploads under mod_Perl on WinNT by ajt

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.